From ed33bf91fc5999eb55442524458585be3fc608e4 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Mon, 28 Jul 2014 13:22:30 +0200 Subject: build system bug not relevant anymore --- compat/qt-bug-appeasement.cpp | 1 - 1 file changed, 1 deletion(-) delete mode 100644 compat/qt-bug-appeasement.cpp (limited to 'compat') diff --git a/compat/qt-bug-appeasement.cpp b/compat/qt-bug-appeasement.cpp deleted file mode 100644 index 9a86ac0a2..000000000 --- a/compat/qt-bug-appeasement.cpp +++ /dev/null @@ -1 +0,0 @@ -#include "facetracknoir/qt-moc.h" -- cgit v1.2.3 From 350edf6e5c1f253a300fd0b7db6591082558d937 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Mon, 22 Sep 2014 15:19:01 +0200 Subject: needless compat api breakage --- compat/compat.cpp | 9 +++------ compat/compat.h | 4 ++-- freetrackclient/freetrackclient.c | 2 +- ftnoir_protocol_ft/ftnoir_protocol_ft.cpp | 4 ++-- ftnoir_protocol_ft/ftnoir_protocol_ft.h | 2 +- ftnoir_tracker_ht/ftnoir_tracker_ht.cpp | 2 +- 6 files changed, 10 insertions(+), 13 deletions(-) (limited to 'compat') diff --git a/compat/compat.cpp b/compat/compat.cpp index 7b695617c..b5d63f2b9 100644 --- a/compat/compat.cpp +++ b/compat/compat.cpp @@ -4,12 +4,12 @@ * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. */ + +#include #define IN_FTNOIR_COMPAT #include "compat.h" -#include #if defined(_WIN32) - PortableLockedShm::PortableLockedShm(const char* shmName, const char* mutexName, int mapSize) { hMutex = CreateMutexA(NULL, false, mutexName); @@ -43,8 +43,8 @@ void PortableLockedShm::unlock() { (void) ReleaseMutex(hMutex); } - #else +#pragma GCC diagnostic ignored "-Wunused-result" PortableLockedShm::PortableLockedShm(const char *shmName, const char* /*mutexName*/, int mapSize) : size(mapSize) { char filename[512] = {0}; @@ -57,8 +57,6 @@ PortableLockedShm::PortableLockedShm(const char *shmName, const char* /*mutexNam PortableLockedShm::~PortableLockedShm() { - //(void) shm_unlink(shm_filename); - (void) munmap(mem, size); (void) close(fd); } @@ -72,7 +70,6 @@ void PortableLockedShm::unlock() { flock(fd, LOCK_UN); } - #endif bool PortableLockedShm::success() diff --git a/compat/compat.h b/compat/compat.h index 0e4887525..490d89138 100644 --- a/compat/compat.h +++ b/compat/compat.h @@ -38,12 +38,12 @@ public: void lock(); void unlock(); bool success(); - void* mem; + inline void* ptr() { return mem; } private: + void* mem; #if defined(_WIN32) HANDLE hMutex, hMapFile; #else int fd, size; - //char shm_filename[NAME_MAX]; #endif }; diff --git a/freetrackclient/freetrackclient.c b/freetrackclient/freetrackclient.c index 43694cda3..5323bcaeb 100644 --- a/freetrackclient/freetrackclient.c +++ b/freetrackclient/freetrackclient.c @@ -55,7 +55,7 @@ static bool FTCreateMapping(void) PAGE_READWRITE, 0, sizeof(FTHeap), - (LPCSTR) FT_MM_DATA); + (LPCSTR) FREETRACK_HEAP); if (hFTMemMap == NULL) return (pMemData = NULL), false; diff --git a/ftnoir_protocol_ft/ftnoir_protocol_ft.cpp b/ftnoir_protocol_ft/ftnoir_protocol_ft.cpp index d0cbfa974..8b8be63df 100644 --- a/ftnoir_protocol_ft/ftnoir_protocol_ft.cpp +++ b/ftnoir_protocol_ft/ftnoir_protocol_ft.cpp @@ -28,9 +28,9 @@ #include "ftnoir_csv/csv.h" FTNoIR_Protocol::FTNoIR_Protocol() : - shm(FT_MM_DATA, FREETRACK_MUTEX, sizeof(FTHeap)) + shm(FREETRACK_HEAP, FREETRACK_MUTEX, sizeof(FTHeap)) { - pMemData = (FTHeap*) shm.mem; + pMemData = (FTHeap*) shm.ptr(); ProgramName = ""; intGameID = 0; viewsStart = 0; diff --git a/ftnoir_protocol_ft/ftnoir_protocol_ft.h b/ftnoir_protocol_ft/ftnoir_protocol_ft.h index d7a792b78..dc534fda2 100644 --- a/ftnoir_protocol_ft/ftnoir_protocol_ft.h +++ b/ftnoir_protocol_ft/ftnoir_protocol_ft.h @@ -27,7 +27,6 @@ #pragma once #include "ui_ftnoir_ftcontrols.h" #include "facetracknoir/plugin-api.hpp" -#include "fttypes.h" #include #include #include @@ -39,6 +38,7 @@ #include #include "compat/compat.h" #include "facetracknoir/options.h" +#include "fttypes.h" using namespace options; struct settings { diff --git a/ftnoir_tracker_ht/ftnoir_tracker_ht.cpp b/ftnoir_tracker_ht/ftnoir_tracker_ht.cpp index 14d5faa18..15bf3a767 100644 --- a/ftnoir_tracker_ht/ftnoir_tracker_ht.cpp +++ b/ftnoir_tracker_ht/ftnoir_tracker_ht.cpp @@ -138,7 +138,7 @@ void Tracker::load_settings(ht_config_t* config) Tracker::Tracker() : lck_shm(HT_SHM_NAME, HT_MUTEX_NAME, sizeof(ht_shm_t)), - shm(reinterpret_cast(lck_shm.mem)), + shm(reinterpret_cast(lck_shm.ptr())), videoWidget(nullptr), layout(nullptr) { -- cgit v1.2.3