From ddd96403b6fdd1c48f8bc4518e304f63012f335c Mon Sep 17 00:00:00 2001 From: Huanchen Zhai Date: Sun, 18 Aug 2024 17:32:33 -0700 Subject: [PATCH] fix g++14 build --- src/core/integral_compressed.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/integral_compressed.hpp b/src/core/integral_compressed.hpp index 37478049..33678a4d 100644 --- a/src/core/integral_compressed.hpp +++ b/src/core/integral_compressed.hpp @@ -90,7 +90,7 @@ struct CompressedTInt::value>::type> { } void clear() { cps_data->clear(); } FL &operator()(uint16_t i, uint16_t j) { - return (FL &)((*cps_data)[find_index(i, j) * 2]); + return reinterpret_cast((*cps_data)[find_index(i, j) * 2]); } FL operator()(uint16_t i, uint16_t j) const { return FL( @@ -170,7 +170,7 @@ struct CompressedV1Int::value>::type> { size_t size() const { return m; } void clear() { cps_data->clear(); } FL &operator()(uint16_t i, uint16_t j, uint16_t k, uint16_t l) { - return (FL &)(*cps_data)[((((size_t)i * n + j) * n + k) * n + l) * 2]; + return reinterpret_cast((*cps_data)[((((size_t)i * n + j) * n + k) * n + l) * 2]); } FL operator()(uint16_t i, uint16_t j, uint16_t k, uint16_t l) const { return FL( @@ -272,7 +272,7 @@ struct CompressedV4Int::value>::type> { size_t size() const { return (size_t)m * m; } void clear() { cps_data->clear(); } FL &operator()(uint16_t i, uint16_t j, uint16_t k, uint16_t l) { - return (FL &)(*cps_data)[find_index(i, j, k, l) * 2]; + return reinterpret_cast((*cps_data)[find_index(i, j, k, l) * 2]); } FL operator()(uint16_t i, uint16_t j, uint16_t k, uint16_t l) const { return FL(((const CompressedVector @@ -374,7 +374,7 @@ struct CompressedV8Int::value>::type> { size_t size() const { return ((size_t)m * (m + 1) >> 1); } void clear() { cps_data->clear(); } FL &operator()(uint16_t i, uint16_t j, uint16_t k, uint16_t l) { - return (FL &)(*cps_data)[find_index(i, j, k, l) * 2]; + return reinterpret_cast((*cps_data)[find_index(i, j, k, l) * 2]); } FL operator()(uint16_t i, uint16_t j, uint16_t k, uint16_t l) const { return FL(((const CompressedVector