summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2007-11-04 16:33:53 +0000
committerChris Wilson <chris+github@qwirx.com>2007-11-04 16:33:53 +0000
commitf24aa2064954b1c529621c8e6425d26c0c78b1bb (patch)
tree930fbc3c44afa10223546eb26e8f75c6c951fc32 /lib
parenta7c1c05da41829419060ea3e60c0fa4f95dc4e67 (diff)
Allow ObjectExists() to take a std::string instead of just char *.
Diffstat (limited to 'lib')
-rw-r--r--lib/common/Utils.cpp6
-rw-r--r--lib/common/Utils.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/common/Utils.cpp b/lib/common/Utils.cpp
index 5dc03124..de392ef4 100644
--- a/lib/common/Utils.cpp
+++ b/lib/common/Utils.cpp
@@ -135,15 +135,15 @@ bool FileExists(const char *Filename, int64_t *pFileSize, bool TreatLinksAsNotEx
// --------------------------------------------------------------------------
//
// Function
-// Name: ObjectExists(const char *)
+// Name: ObjectExists(const std::string& rFilename)
// Purpose: Does a object exist, and if so, is it a file or a directory?
// Created: 23/11/03
//
// --------------------------------------------------------------------------
-int ObjectExists(const char *Filename)
+int ObjectExists(const std::string& rFilename)
{
struct stat st;
- if(::stat(Filename, &st) != 0)
+ if(::stat(rFilename.c_str(), &st) != 0)
{
if(errno == ENOENT)
{
diff --git a/lib/common/Utils.h b/lib/common/Utils.h
index 5da84d9a..d0842b51 100644
--- a/lib/common/Utils.h
+++ b/lib/common/Utils.h
@@ -29,7 +29,7 @@ enum
ObjectExists_File = 1,
ObjectExists_Dir = 2
};
-int ObjectExists(const char *Filename);
+int ObjectExists(const std::string& rFilename);
#include "MemLeakFindOff.h"