From bb9679b51a64036c37add83adf1adea12e0a3c7c Mon Sep 17 00:00:00 2001 From: Tsuda Kageyu Date: Thu, 21 May 2015 02:03:06 +0900 Subject: [PATCH] Fix test code to work on some environments. const char * is more preferable than string for ifstream constructor. --- tests/utils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/utils.h b/tests/utils.h index 8be65ac0..871a8e50 100644 --- a/tests/utils.h +++ b/tests/utils.h @@ -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);