From fb1e7bab03a5817bb9774aa0fa2c5440db85556c 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(-) 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