From f3fe62a0bf9e775b3e6e838f104ab605a2238792 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Blot?= Date: Wed, 19 Apr 2017 23:02:07 +0200 Subject: Fix various copy instead of const ref reported by cppcheck (#5615) * Also remove InventoryList::peekItem unused function * Fix some post increment to preincrement reported by cppcheck --- src/environment.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/environment.cpp') diff --git a/src/environment.cpp b/src/environment.cpp index 9c2ea8896..c1aeeec60 100644 --- a/src/environment.cpp +++ b/src/environment.cpp @@ -70,7 +70,7 @@ void Environment::setTimeOfDay(u32 time) { MutexAutoLock lock(this->m_time_lock); if (m_time_of_day > time) - m_day_count++; + ++m_day_count; m_time_of_day = time; m_time_of_day_f = (float)time / 24000.0; } @@ -103,7 +103,7 @@ void Environment::stepTimeOfDay(float dtime) // Sync at overflow if (m_time_of_day + units >= 24000) { sync_f = true; - m_day_count++; + ++m_day_count; } m_time_of_day = (m_time_of_day + units) % 24000; if (sync_f) -- cgit v1.2.3