diff options
author | Josh Haberman <jhaberman@gmail.com> | 2016-04-29 10:22:56 -0700 |
---|---|---|
committer | Josh Haberman <jhaberman@gmail.com> | 2016-04-29 10:25:52 -0700 |
commit | b2d4b1a528a4b2e808ac2924e0552e4ea94c1d87 (patch) | |
tree | e59ab0feba1ede08d3fc3db70045606bd3fe8a56 /benchmarks | |
parent | 49a8918e9742d4bc9f577df9599061e342516b96 (diff) |
Fixed for pre-C++11 ifstream which does not accept std::string.
Diffstat (limited to 'benchmarks')
-rw-r--r-- | benchmarks/generate_datasets.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/benchmarks/generate_datasets.cc b/benchmarks/generate_datasets.cc index 8e9b441c..dab635e7 100644 --- a/benchmarks/generate_datasets.cc +++ b/benchmarks/generate_datasets.cc @@ -86,7 +86,7 @@ void WriteFileWithPayloads(const std::string& name, std::ofstream writer; std::string fname = file_prefix + name + file_suffix; - writer.open(fname); + writer.open(fname.c_str()); writer << serialized; writer.close(); @@ -101,7 +101,7 @@ void WriteFile(const std::string& name, const std::string& message_name, } std::string ReadFile(const std::string& name) { - std::ifstream file(name); + std::ifstream file(name.c_str()); GOOGLE_CHECK(file.is_open()) << "Couldn't find file '" << name << "', please make sure you are running " "this command from the benchmarks/ " |