diff options
author | I-Jui (Ray) Sung <ray@multicorewareinc.com> | 2013-11-15 13:37:22 -0600 |
---|---|---|
committer | I-Jui (Ray) Sung <ray@multicorewareinc.com> | 2013-11-15 13:37:22 -0600 |
commit | ec6d0deca7e2fcde1f461e093b51bd101fe1eba9 (patch) | |
tree | d0d280df165c1c02aad603d8d01b4d711ca29361 /sc/source/core | |
parent | a1e6bbbdaabcf37d8d8dfd89f6372e9521f36a22 (diff) |
GPU Calc: fix compilation error in using sprintf
Change-Id: Iea316f3355a9105702391aa7b76268cdfc8831ef
Diffstat (limited to 'sc/source/core')
-rw-r--r-- | sc/source/core/opencl/op_math.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sc/source/core/opencl/op_math.cxx b/sc/source/core/opencl/op_math.cxx index dc5d7d4fb565..5e5c7494bc2c 100644 --- a/sc/source/core/opencl/op_math.cxx +++ b/sc/source/core/opencl/op_math.cxx @@ -1927,10 +1927,11 @@ void OpProduct::GenSlidingWindowFunction(std::stringstream &ss, ss << " int gid0 = get_global_id(0);\n"; ss << " int i = 0;\n"; ss << " double product=0.0;\n\n"; - char sArgNoI[5]; for (unsigned i = 0; i < vSubArguments.size(); i++) { - sprintf(sArgNoI,"%d",i); + std::stringstream ssArgNoI; + ssArgNoI << i; + std::string sArgNoI = ssArgNoI.str(); ss << std::string(" double arg")+sArgNoI+";\n"; FormulaToken *pCur = vSubArguments[i]->GetFormulaToken(); assert(pCur); |