summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYouri Mouton <[email protected]>2016-06-16 12:00:04 +0200
committermonsta <[email protected]>2016-08-07 11:25:38 +0300
commitfb1e7bab03a5817bb9774aa0fa2c5440db85556c (patch)
tree15ba2ea0061a728aefa2837b61f873e773d3ea4c
parent8f4bef2d6de48c0af0bb3e3c982481e63e79479a (diff)
downloadmate-system-monitor-fb1e7bab03a5817bb9774aa0fa2c5440db85556c.tar.bz2
mate-system-monitor-fb1e7bab03a5817bb9774aa0fa2c5440db85556c.tar.xz
Casting temporaries to references is not valid.
-rw-r--r--src/lsof.cpp4
1 files changed, 3 insertions, 1 deletions
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&>(std::ostringstream() << count).str();
+ std::ostringstream ss;
+ ss << count;
+ string s = ss.str();
gtk_label_set_text(this->count, s.c_str());
}