[apps/shared] Remove packed data members for RecordDataBuffer

Change-Id: I04ea5ccb4c15bda975bf5af178f07092c0387312
This commit is contained in:
Hugo Saint-Vignes
2020-06-04 12:24:29 +02:00
committed by Émilie Feral
parent 78a1350f15
commit 0a2ededfcf
8 changed files with 119 additions and 14 deletions

View File

@@ -61,7 +61,7 @@ protected:
* creating dependency on uninitialized values. */
class RecordDataBuffer {
public:
RecordDataBuffer(KDColor color) : m_color(color), m_active(true) {}
RecordDataBuffer(KDColor color, size_t size);
KDColor color() const {
return KDColor::RGB16(m_color);
}
@@ -77,9 +77,9 @@ protected:
* version of uint16_t type to avoid producing an alignment error on the
* emscripten platform. */
static_assert(sizeof(emscripten_align1_short) == sizeof(uint16_t), "emscripten_align1_short should have the same size as uint16_t");
emscripten_align1_short m_color __attribute__((packed));
emscripten_align1_short m_color;
#else
uint16_t m_color __attribute__((packed));
uint16_t m_color;
#endif
bool m_active;
};