sc/source/core/opencl/op_math_helpers.hxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
New commits: commit 43f2cdb3b41ff4f5e99500f0c0082d4bfa4bc97c Author: Luboš Luňák <l.lu...@collabora.com> AuthorDate: Thu Sep 22 09:55:00 2022 +0200 Commit: Luboš Luňák <l.lu...@collabora.com> CommitDate: Thu Sep 22 17:59:36 2022 +0200 fix incorrect as_double usage in opencl as_double interprets the binary representation, it is not a cast. Change-Id: I3034a36b84fbf458b8818af1e2255b532d21d229 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140369 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lu...@collabora.com> diff --git a/sc/source/core/opencl/op_math_helpers.hxx b/sc/source/core/opencl/op_math_helpers.hxx index 81fb8f5a8541..015afcf547fb 100644 --- a/sc/source/core/opencl/op_math_helpers.hxx +++ b/sc/source/core/opencl/op_math_helpers.hxx @@ -117,12 +117,12 @@ const char is_representable_integerDecl[] = "int is_representable_integer(doubl const char is_representable_integer[] = "int is_representable_integer(double a) {\n" " long kMaxInt = (1L << 53) - 1;\n" -" if (a <= as_double(kMaxInt))\n" +" if (a <= (double)kMaxInt)\n" " {\n" -" long nInt = as_long(a);\n" +" long nInt = (long)a;\n" " double fInt;\n" " return (nInt <= kMaxInt &&\n" -" (!((fInt = as_double(nInt)) < a) && !(fInt > a)));\n" +" (!((fInt = (double)nInt) < a) && !(fInt > a)));\n" " }\n" " return 0;\n" "}\n";