[Box Backup-commit] COMMIT r2677 - box/trunk/lib/common

subversion at boxbackup.org subversion at boxbackup.org
Thu Mar 18 21:39:20 GMT 2010


Author: chris
Date: 2010-03-18 21:39:20 +0000 (Thu, 18 Mar 2010)
New Revision: 2677

Modified:
   box/trunk/lib/common/Test.cpp
   box/trunk/lib/common/Test.h
Log:
Make TestGetFileSize take a std::string instead of a char * for C++ 
style.


Modified: box/trunk/lib/common/Test.cpp
===================================================================
--- box/trunk/lib/common/Test.cpp	2010-03-18 21:38:45 UTC (rev 2676)
+++ box/trunk/lib/common/Test.cpp	2010-03-18 21:39:20 UTC (rev 2677)
@@ -43,10 +43,10 @@
 }
 
 // -1 if doesn't exist
-int TestGetFileSize(const char *Filename)
+int TestGetFileSize(const std::string& Filename)
 {
 	EMU_STRUCT_STAT st;
-	if(EMU_STAT(Filename, &st) == 0)
+	if(EMU_STAT(Filename.c_str(), &st) == 0)
 	{
 		return st.st_size;
 	}

Modified: box/trunk/lib/common/Test.h
===================================================================
--- box/trunk/lib/common/Test.h	2010-03-18 21:38:45 UTC (rev 2676)
+++ box/trunk/lib/common/Test.h	2010-03-18 21:39:20 UTC (rev 2677)
@@ -140,7 +140,7 @@
 bool TestDirExists(const char *Filename);
 
 // -1 if doesn't exist
-int TestGetFileSize(const char *Filename);
+int TestGetFileSize(const std::string& Filename);
 std::string ConvertPaths(const std::string& rOriginal);
 int RunCommand(const std::string& rCommandLine);
 bool ServerIsAlive(int pid);




More information about the Boxbackup-commit mailing list