From f46509d5e2c681b6da2abdeb27779be3c36a6916 Mon Sep 17 00:00:00 2001 From: SmallJoker Date: Mon, 5 Oct 2020 09:07:33 +0200 Subject: Remove unused functions reported by cppcheck (#10463) Run unused functions reported by cppcheck This change removes a few (but not all) unused functions. Some unused helper functions were not removed due to their complexity and potential of future use. --- src/client/clientenvironment.cpp | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'src/client/clientenvironment.cpp') diff --git a/src/client/clientenvironment.cpp b/src/client/clientenvironment.cpp index 0b7e92325..f831978a8 100644 --- a/src/client/clientenvironment.cpp +++ b/src/client/clientenvironment.cpp @@ -368,21 +368,6 @@ bool isFreeClientActiveObjectId(const u16 id, } -u16 getFreeClientActiveObjectId(ClientActiveObjectMap &objects) -{ - // try to reuse id's as late as possible - static u16 last_used_id = 0; - u16 startid = last_used_id; - for(;;) { - last_used_id ++; - if (isFreeClientActiveObjectId(last_used_id, objects)) - return last_used_id; - - if (last_used_id == startid) - return 0; - } -} - u16 ClientEnvironment::addActiveObject(ClientActiveObject *object) { // Register object. If failed return zero id -- cgit v1.2.3