Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion compiler/cpp/src/thrift/generate/t_generator.h
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,9 @@ class template_ofstream_with_content_based_conditional_update : public std::ostr
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()) {
Expand Down