summaryrefslogtreecommitdiff
path: root/modules/worldengine
diff options
context:
space:
mode:
authorYehonal <yehonal.azeroth@gmail.com>2017-09-18 03:16:32 +0200
committerYehonal <yehonal.azeroth@gmail.com>2017-09-18 03:16:32 +0200
commit5ec07ef31ff972dbe3c3be3fdaab4ab8aad9512c (patch)
tree6b2126773aea642162afaeaa6db99103d55184ef /modules/worldengine
parentcf627d832717c990b02da5e5ba06b4f218079321 (diff)
Removed more warnings, mostly related to unused-variable
issue #121 We still have to work on unused-parameter
Diffstat (limited to 'modules/worldengine')
-rw-r--r--modules/worldengine/lib-collision/src/Management/MMapFactory.cpp2
-rw-r--r--modules/worldengine/lib-collision/src/Management/MMapFactory.h2
-rw-r--r--modules/worldengine/nucleus/src/Threading/Threading.cpp10
3 files changed, 10 insertions, 4 deletions
diff --git a/modules/worldengine/lib-collision/src/Management/MMapFactory.cpp b/modules/worldengine/lib-collision/src/Management/MMapFactory.cpp
index b8573f7f89..798fecaadb 100644
--- a/modules/worldengine/lib-collision/src/Management/MMapFactory.cpp
+++ b/modules/worldengine/lib-collision/src/Management/MMapFactory.cpp
@@ -23,7 +23,7 @@ namespace MMAP
return g_MMapManager;
}
- bool MMapFactory::IsPathfindingEnabled(const Map* map, bool force)
+ bool MMapFactory::IsPathfindingEnabled(const Map* map)
{
if (!map) return false;
return !forbiddenMaps[map->GetId()] && (sWorld->getBoolConfig(CONFIG_ENABLE_MMAPS) ? true : map->IsBattlegroundOrArena());
diff --git a/modules/worldengine/lib-collision/src/Management/MMapFactory.h b/modules/worldengine/lib-collision/src/Management/MMapFactory.h
index 2020d74e8e..84799f8118 100644
--- a/modules/worldengine/lib-collision/src/Management/MMapFactory.h
+++ b/modules/worldengine/lib-collision/src/Management/MMapFactory.h
@@ -31,7 +31,7 @@ namespace MMAP
public:
static MMapManager* createOrGetMMapManager();
static void clear();
- static bool IsPathfindingEnabled(const Map* map, bool force = false);
+ static bool IsPathfindingEnabled(const Map* map);
static void InitializeDisabledMaps();
static bool forbiddenMaps[1000];
};
diff --git a/modules/worldengine/nucleus/src/Threading/Threading.cpp b/modules/worldengine/nucleus/src/Threading/Threading.cpp
index eac2178ec8..e62d92dea8 100644
--- a/modules/worldengine/nucleus/src/Threading/Threading.cpp
+++ b/modules/worldengine/nucleus/src/Threading/Threading.cpp
@@ -79,12 +79,15 @@ std::thread::id Thread::currentId()
void Thread::setPriority(Priority priority)
{
+#ifdef WIN32
std::thread::native_handle_type handle = m_ThreadImp.native_handle();
+#endif
+
bool _ok = true;
-#ifdef WIN32
switch (priority)
{
+#ifdef WIN32
case Priority_Realtime: _ok = SetThreadPriority(handle, THREAD_PRIORITY_TIME_CRITICAL); break;
case Priority_Highest: _ok = SetThreadPriority(handle, THREAD_PRIORITY_HIGHEST); break;
case Priority_High: _ok = SetThreadPriority(handle, THREAD_PRIORITY_ABOVE_NORMAL); break;
@@ -92,8 +95,11 @@ void Thread::setPriority(Priority priority)
case Priority_Low: _ok = SetThreadPriority(handle, THREAD_PRIORITY_BELOW_NORMAL); break;
case Priority_Lowest: _ok = SetThreadPriority(handle, THREAD_PRIORITY_LOWEST); break;
case Priority_Idle: _ok = SetThreadPriority(handle, THREAD_PRIORITY_IDLE); break;
- }
#endif
+ default:
+ break;
+ }
+
// remove this ASSERT in case you don't want to know is thread priority change was successful or not
ASSERT(_ok);