aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Snover2017-11-11 11:46:47 -0600
committerColin Snover2017-11-17 22:47:59 -0600
commit61a63f84006317b2ece155a0dd80f080b4d8069e (patch)
treee81ce3c9e1a9d8a8a7fd58add5f8458a0318d01f
parent6c40ceded18b918aa13780e216b89c205514275f (diff)
downloadscummvm-rg350-61a63f84006317b2ece155a0dd80f080b4d8069e.tar.gz
scummvm-rg350-61a63f84006317b2ece155a0dd80f080b4d8069e.tar.bz2
scummvm-rg350-61a63f84006317b2ece155a0dd80f080b4d8069e.zip
CREATE_PROJECT: Fix compilation failure in C++11 mode
Getting the address of an rvalue is invalid, and not necessary here. Once C++11 can be used always, this utility function can just be replaced with std::to_string.
-rw-r--r--devtools/create_project/create_project.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/devtools/create_project/create_project.cpp b/devtools/create_project/create_project.cpp
index 6715191707..e59924c033 100644
--- a/devtools/create_project/create_project.cpp
+++ b/devtools/create_project/create_project.cpp
@@ -1170,7 +1170,9 @@ bool producesObjectFile(const std::string &fileName) {
}
std::string toString(int num) {
- return static_cast<std::ostringstream*>(&(std::ostringstream() << num))->str();
+ std::ostringstream os;
+ os << num;
+ return os.str();
}
/**