summaryrefslogtreecommitdiffhomepage
path: root/proto-ft
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-05-28 14:02:30 +0200
committerStanislaw Halik <sthalik@misaki.pl>2018-05-28 14:02:30 +0200
commit2fa41ee72a24aadafbc3074d4a18a58d7d6a0a50 (patch)
tree179b218b7da1da38e7f1655fa00d5f310b05219e /proto-ft
parent9586a7b88d450ccc15b47549cf17e5aaa9e90629 (diff)
proto/ft: cleanup asserts
Diffstat (limited to 'proto-ft')
-rw-r--r--proto-ft/ftnoir_protocol_ft.cpp14
1 files changed, 1 insertions, 13 deletions
diff --git a/proto-ft/ftnoir_protocol_ft.cpp b/proto-ft/ftnoir_protocol_ft.cpp
index 059b470c..d25199ba 100644
--- a/proto-ft/ftnoir_protocol_ft.cpp
+++ b/proto-ft/ftnoir_protocol_ft.cpp
@@ -91,21 +91,9 @@ void freetrack::pose(const double* headpose)
(void)CSV::getGameData(id, t.table, gamename);
{
-#if 0
- const std::uintptr_t addr = (std::uintptr_t)(void*)&pMemData->table[0];
- const std::uintptr_t addr_ = addr & ~(sizeof(LONG)-1u);
-
- // the data `happens' to be aligned by virtue of element ordering
- // inside FTHeap. there's no deeper reason behind it.
-
- if (addr != addr_)
- assert(!"unaligned access");
-
- static_assert(sizeof(LONG) == 4, "");
-#else
// FTHeap pMemData happens to be aligned on a page boundary by virtue of
+ // memory mapping usage (MS Windows equivalent of mmap(2)).
static_assert((offsetof(FTHeap, table) & sizeof(LONG)-1) == 0);
-#endif
for (unsigned k = 0; k < 2; k++)
store(pMemData->table_ints[k], t.ints[k]);