From: Marcin Siodelski Date: Fri, 6 Feb 2015 12:48:01 +0000 (+0100) Subject: [master] Use c-strings to create fstreams in lfc. X-Git-Tag: trac3712_base~14 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=814a6cea4e9d5bb712475aefef6eecc2674db4b9;p=thirdparty%2Fkea.git [master] Use c-strings to create fstreams in lfc. --- diff --git a/src/bin/lfc/tests/lfc_controller_unittests.cc b/src/bin/lfc/tests/lfc_controller_unittests.cc index 69de34dac4..d0cc808e3a 100644 --- a/src/bin/lfc/tests/lfc_controller_unittests.cc +++ b/src/bin/lfc/tests/lfc_controller_unittests.cc @@ -112,7 +112,7 @@ std::string LFCControllerTest::readFile(const std::string& filename) const { std::ifstream fs; - fs.open(filename, std::ifstream::in); + fs.open(filename.c_str(), std::ifstream::in); std::string contents((std::istreambuf_iterator(fs)), std::istreambuf_iterator()); fs.close(); @@ -122,7 +122,7 @@ LFCControllerTest::readFile(const std::string& filename) const { void LFCControllerTest::writeFile(const std::string& filename, const std::string& contents) const { - std::ofstream fs(filename, std::ofstream::out); + std::ofstream fs(filename.c_str(), std::ofstream::out); if (fs.is_open()) { fs << contents;