]> granicus.if.org Git - taglib/commitdiff
Fix test code to work on some environments.
authorTsuda Kageyu <tsuda.kageyu@gmail.com>
Wed, 20 May 2015 17:03:06 +0000 (02:03 +0900)
committerTsuda Kageyu <tsuda.kageyu@gmail.com>
Wed, 20 May 2015 17:03:06 +0000 (02:03 +0900)
const char * is more preferable than string for ifstream constructor.

tests/utils.h

index 8be65ac04ce90c165c46c87f7f8793d02ea13213..871a8e50c038b37338ba6a8fb99c34639c3a15b9 100644 (file)
@@ -39,7 +39,7 @@ inline string copyFile(const string &filename, const string &ext)
 #endif
 
   string sourceFileName = testFilePath(filename) + ext;
-  ifstream source(sourceFileName, std::ios::binary);
+  ifstream source(sourceFileName.c_str(), std::ios::binary);
   ofstream destination(testFileName, std::ios::binary);
   destination << source.rdbuf();
   return string(testFileName);