diff options
author | Chris Wilson <chris+github@qwirx.com> | 2009-06-27 11:35:02 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2009-06-27 11:35:02 +0000 |
commit | 072a7dd031ef8f93d0688f1b87ee73ae4620c99f (patch) | |
tree | cbe53c030c099f7e1720e31d1335bdb978d3efe5 | |
parent | fc94bd2d55fda679ae5efa645f34c7d5bc0722c0 (diff) |
Make FileExists take a std::string instead of a const char * for C++
style.
-rw-r--r-- | lib/common/Utils.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
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) { |