summaryrefslogtreecommitdiffhomepage
path: root/proto-ft
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-05-27 22:03:38 +0200
committerStanislaw Halik <sthalik@misaki.pl>2018-05-27 22:03:51 +0200
commit725d740bc3ae0851440eddf4c9a5c52244968989 (patch)
treedd157e50c3dcf7e59e8cf979e2682cb0311e97dc /proto-ft
parentfc01322c7df2cf13e1b0aef2b72fa69121bdcf20 (diff)
proto/ft: add sensible static_assert
Diffstat (limited to 'proto-ft')
-rw-r--r--proto-ft/ftnoir_protocol_ft.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/proto-ft/ftnoir_protocol_ft.cpp b/proto-ft/ftnoir_protocol_ft.cpp
index 42b1bbf6..059b470c 100644
--- a/proto-ft/ftnoir_protocol_ft.cpp
+++ b/proto-ft/ftnoir_protocol_ft.cpp
@@ -11,6 +11,7 @@
#include "ftnoir_protocol_ft.h"
#include "csv/csv.h"
+#include <cstddef>
#include <cmath>
#include <windows.h>
@@ -101,6 +102,9 @@ void freetrack::pose(const double* headpose)
assert(!"unaligned access");
static_assert(sizeof(LONG) == 4, "");
+#else
+ // FTHeap pMemData happens to be aligned on a page boundary by virtue of
+ static_assert((offsetof(FTHeap, table) & sizeof(LONG)-1) == 0);
#endif
for (unsigned k = 0; k < 2; k++)