From 072a7dd031ef8f93d0688f1b87ee73ae4620c99f Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sat, 27 Jun 2009 11:35:02 +0000 Subject: Make FileExists take a std::string instead of a const char * for C++ style. --- lib/common/Utils.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lib/common') diff --git a/lib/common/Utils.cpp b/lib/common/Utils.cpp index f45ed26b..6cac5587 100644 --- a/lib/common/Utils.cpp +++ b/lib/common/Utils.cpp @@ -156,15 +156,16 @@ void DumpStackBacktrace() // -------------------------------------------------------------------------- // // Function -// Name: FileExists(const char *) +// Name: FileExists(const std::string& rFilename) // Purpose: Does a file exist? // Created: 20/11/03 // // -------------------------------------------------------------------------- -bool FileExists(const char *Filename, int64_t *pFileSize, bool TreatLinksAsNotExisting) +bool FileExists(const std::string& rFilename, int64_t *pFileSize, + bool TreatLinksAsNotExisting) { EMU_STRUCT_STAT st; - if(EMU_LSTAT(Filename, &st) != 0) + if(EMU_LSTAT(rFilename.c_str(), &st) != 0) { if(errno == ENOENT) { -- cgit v1.2.3