comparison src/sys/x11/settings.cc @ 354:9aaf1e788896

core/endian: fix compile error under clang
author Paper <paper@paper.us.eu.org>
date Sun, 14 Jul 2024 23:39:42 -0400
parents 2f094656e775
children 99c961c91809
comparison
equal deleted inserted replaced
353:2f094656e775 354:9aaf1e788896
60 ret = *reinterpret_cast<T*>(bytes_ + offset_); 60 ret = *reinterpret_cast<T*>(bytes_ + offset_);
61 Advance(sizeof(T)); 61 Advance(sizeof(T));
62 return true; 62 return true;
63 } 63 }
64 64
65 /* will fail on signed integers; xsettings has none of those though */
65 template<typename T> 66 template<typename T>
66 bool ReadInt(T& ret) { 67 bool ReadInt(T& ret) {
67 static_assert(std::is_integral<T>::value); 68 static_assert(std::is_integral<T>::value);
68 69
69 if (!ReadData<T>(ret)) 70 if (!ReadData<T>(ret))