From a7e131f53e211ffbe38d34d23b33e13cc401f013 Mon Sep 17 00:00:00 2001 From: Loïc Blot Date: Tue, 25 Apr 2017 10:17:53 +0200 Subject: Fix various points reported by cppcheck (#5656) * Fix various performance issues reported by cppcheck + code style (CI) * Make CI happy with code style on master * guiFileSelectMenu: remove useless includes * some performance fixes pointed by cppcheck * remove some useless casts * TextDest: remove unused setFormSpec function * Fix various iterator post-increment reported by cppcheck --- src/script/cpp_api/s_async.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/script/cpp_api/s_async.cpp') diff --git a/src/script/cpp_api/s_async.cpp b/src/script/cpp_api/s_async.cpp index a1bec83bf..080ae887c 100644 --- a/src/script/cpp_api/s_async.cpp +++ b/src/script/cpp_api/s_async.cpp @@ -46,26 +46,26 @@ AsyncEngine::~AsyncEngine() // Request all threads to stop for (std::vector::iterator it = workerThreads.begin(); - it != workerThreads.end(); it++) { + it != workerThreads.end(); ++it) { (*it)->stop(); } // Wake up all threads for (std::vector::iterator it = workerThreads.begin(); - it != workerThreads.end(); it++) { + it != workerThreads.end(); ++it) { jobQueueCounter.post(); } // Wait for threads to finish for (std::vector::iterator it = workerThreads.begin(); - it != workerThreads.end(); it++) { + it != workerThreads.end(); ++it) { (*it)->wait(); } // Force kill all threads for (std::vector::iterator it = workerThreads.begin(); - it != workerThreads.end(); it++) { + it != workerThreads.end(); ++it) { delete *it; } @@ -205,7 +205,7 @@ void AsyncEngine::pushFinishedJobs(lua_State* L) { void AsyncEngine::prepareEnvironment(lua_State* L, int top) { for (UNORDERED_MAP::iterator it = functionList.begin(); - it != functionList.end(); it++) { + it != functionList.end(); ++it) { lua_pushstring(L, it->first.c_str()); lua_pushcfunction(L, it->second); lua_settable(L, top); -- cgit v1.2.3