From 7d66656c106f8672d2165b708b9f735c96ad62f1 Mon Sep 17 00:00:00 2001 From: Brian Cox Date: Mon, 27 Mar 2017 16:43:00 -0700 Subject: [PATCH] Build fix for tests, since you don't always have an ifstream/ofstream constructor that takes a string reference --- src/twtest/fspropcalc_t.cpp | 2 +- src/twtest/policyparser_t.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/twtest/fspropcalc_t.cpp b/src/twtest/fspropcalc_t.cpp index d70bc3f..1e56b4c 100644 --- a/src/twtest/fspropcalc_t.cpp +++ b/src/twtest/fspropcalc_t.cpp @@ -75,7 +75,7 @@ void TestFSPropCalc() // oh boy! I finally get to test property calculation! d.TraceDebug("Creating FCO c:\\temp\\foo.bin\n"); - std::ofstream fstr(foo_bin); + std::ofstream fstr(foo_bin.c_str()); if(fstr.bad()) { d.TraceError("Unable to create test file %s!\n", foo_bin.c_str()); diff --git a/src/twtest/policyparser_t.cpp b/src/twtest/policyparser_t.cpp index 2353f14..8a5c3c5 100644 --- a/src/twtest/policyparser_t.cpp +++ b/src/twtest/policyparser_t.cpp @@ -75,7 +75,7 @@ void test_policy_file(const std::string& polfile) pol_path.append(polfile); std::ifstream in; - in.open(pol_path); + in.open(pol_path.c_str()); if( ! in.good() ) throw eParserHelper( _T("couldn't open test file") );