From 8bd070a19b13c9830b3be7700cf55e7845c98642 Mon Sep 17 00:00:00 2001 From: Youri Mouton Date: Thu, 16 Jun 2016 12:00:04 +0200 Subject: Casting temporaries to references is not valid. --- src/lsof.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/lsof.cpp b/src/lsof.cpp index 25cc3c4..0a11c0a 100644 --- a/src/lsof.cpp +++ b/src/lsof.cpp @@ -137,7 +137,9 @@ namespace void update_count(unsigned count) { - string s = static_cast(std::ostringstream() << count).str(); + std::ostringstream ss; + ss << count; + string s = ss.str(); gtk_label_set_text(this->count, s.c_str()); } -- cgit v1.2.1