From 2fa41ee72a24aadafbc3074d4a18a58d7d6a0a50 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Mon, 28 May 2018 14:02:30 +0200 Subject: proto/ft: cleanup asserts --- proto-ft/ftnoir_protocol_ft.cpp | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'proto-ft') 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]); -- cgit v1.2.3