summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@theqtcompany.com>2016-06-15 12:29:07 +0200
committerLaszlo Agocs <laszlo.agocs@theqtcompany.com>2016-06-15 11:38:17 +0000
commit59956ec905de1045039544833ebb66b1a294a4a5 (patch)
tree7fbd86ace0edb944bf268438b5b8e4a2aec831a4
parentac8a1787eb74d374a346ae5982d0ea361747729e (diff)
Fix rgb64 on aarch64
Instead of quint64 use uint64_t in order to avoid errors like error: invalid conversion from 'quint64* {aka long long unsigned int*}' to 'const uint64_t* {aka const long unsigned int*}' Unify const usage for LOAD and switch to C++ casts. Change-Id: I4a6a8ec5b24f2f306645178fe00f6bfb1c429403 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
-rw-r--r--src/gui/painting/qcompositionfunctions.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/painting/qcompositionfunctions.cpp b/src/gui/painting/qcompositionfunctions.cpp
index 641550766a..8d4ea58c39 100644
--- a/src/gui/painting/qcompositionfunctions.cpp
+++ b/src/gui/painting/qcompositionfunctions.cpp
@@ -88,17 +88,17 @@ QT_BEGIN_NAMESPACE
}
#if defined __SSE2__
-# define LOAD(ptr) _mm_loadl_epi64((__m128i*)(ptr))
+# define LOAD(ptr) _mm_loadl_epi64(reinterpret_cast<const __m128i *>(ptr))
# define CONVERT(value) _mm_shufflelo_epi16(_mm_cvtsi32_si128(value), _MM_SHUFFLE(0, 0, 0, 0))
-# define STORE(ptr, value) _mm_storel_epi64((__m128i*)(ptr), value)
+# define STORE(ptr, value) _mm_storel_epi64(reinterpret_cast<__m128i *>(ptr), value)
# define ADD(p, q) _mm_add_epi32(p, q)
# define ALPHA(c) _mm_shufflelo_epi16(c, _MM_SHUFFLE(3, 3, 3, 3))
# define CONST(n) CONVERT(n)
# define INVALPHA(c) _mm_sub_epi32(CONST(65535), ALPHA(c))
#elif defined __ARM_NEON__
-# define LOAD(ptr) vreinterpret_u16_u64(vld1_u64((quint64*)(ptr)))
+# define LOAD(ptr) vreinterpret_u16_u64(vld1_u64(reinterpret_cast<const uint64_t *>(ptr)))
# define CONVERT(value) vreinterpret_u16_u64(vmov_n_u64(value))
-# define STORE(ptr, value) vst1_u64((quint64*)(ptr), vreinterpret_u64_u16(value))
+# define STORE(ptr, value) vst1_u64(reinterpret_cast<uint64_t *>(ptr), vreinterpret_u64_u16(value))
# define ADD(p, q) vadd_u16(p, q)
# define ALPHA(c) vdup_lane_u16(c, 3)
# define CONST(n) vdup_n_u16(n)