summaryrefslogtreecommitdiff
authorTor Lillqvist <tml@collabora.com>2013-11-20 19:42:20 (GMT)
committer Tor Lillqvist <tml@collabora.com>2013-11-20 19:44:05 (GMT)
commit008471428cb6122c6b3b444a0f9ff094e16774df (patch) (side-by-side diff)
tree885f0744a8f4bbd73355c4b7fcb747224304510e
parentbd390560539cec344323e1bc68b7e19a0aa4fbb3 (diff)
downloadcore-008471428cb6122c6b3b444a0f9ff094e16774df.zip
core-008471428cb6122c6b3b444a0f9ff094e16774df.tar.gz
Simply use a separate temp variable
The dynamic_cast thing caused error: dynamic_cast from rvalue to reference type 'std::ostringstream &' (aka 'basic_ostringstream<char> &') with Clang in C++11 mode. Clearly putting the value of integer expressions into strings is a very esoteric corner case that very few C++ programs need to do, if it is this hard to do it and there is no obvious standard idiom that would work in all compilers and language vintages. Change-Id: I46ed2bd2a8f860d7323682b19886ec732b0722c1
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--sc/source/core/opencl/opencl_device.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/sc/source/core/opencl/opencl_device.cxx b/sc/source/core/opencl/opencl_device.cxx
index 963e10a..90b9033 100644
--- a/sc/source/core/opencl/opencl_device.cxx
+++ b/sc/source/core/opencl/opencl_device.cxx
@@ -244,7 +244,9 @@ ds_status evaluateScoreForDevice(ds_device* device, void* evalData)
bool bAmdFp64Flag = false;
const char* buildOption = NULL;
std::string tmpStr("-Dfp_t=double -Dfp_t4=double4 -Dfp_t16=double16 -DINPUTSIZE=");
- tmpStr.append(dynamic_cast<std::ostringstream&>(std::ostringstream() << std::dec << INPUTSIZE).str());
+ std::ostringstream tmpOStrStr;
+ tmpOStrStr << std::dec << INPUTSIZE;
+ tmpStr.append(tmpOStrStr.str());
if ((std::string(aExtInfo)).find("cl_khr_fp64") != std::string::npos)
{