diff options
Diffstat (limited to 'compiler/cpp/src/thrift/generate/t_generator.h')
-rw-r--r-- | compiler/cpp/src/thrift/generate/t_generator.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/cpp/src/thrift/generate/t_generator.h b/compiler/cpp/src/thrift/generate/t_generator.h index f82463d0c..21c2798e5 100644 --- a/compiler/cpp/src/thrift/generate/t_generator.h +++ b/compiler/cpp/src/thrift/generate/t_generator.h @@ -419,7 +419,9 @@ public: old_file.open(output_file_path.c_str(), std::ios::in); if (old_file) { - std::string const old_file_contents(static_cast<std::ostringstream const&>(std::ostringstream() << old_file.rdbuf()).str()); + std::ostringstream oss; + oss << old_file.rdbuf(); + std::string const old_file_contents(oss.str()); old_file.close(); if (old_file_contents != str()) { |