talamortis / OregonCore

World of Warcraft 2.4.3 Server Emulator
GNU General Public License v2.0
69 stars 51 forks source link

Remove obsolete SetGridId function #253

Closed shagu closed 3 years ago

shagu commented 3 years ago

The definition of the obsolete SetGridId function:

void SetGridId(const uint32 id) const { i_gridId = id; }

breaks the build on recent compilers (clang12 on archlinux):

In file included from /home/user/oregoncore/server/src/server/game/Grids/GridDefines.h:22:
/home/user/oregoncore/server/src/framework/GameSystem/NGrid.h:98:58: error: cannot assign to non-static data member within const member function 'SetGridId'
        void SetGridId(const uint32 id) const { i_gridId = id; }
                                                ~~~~~~~~ ^
/home/user/oregoncore/server/src/framework/GameSystem/NGrid.h:98:14: note: member function 'NGrid::SetGridId' is declared const here
        void SetGridId(const uint32 id) const { i_gridId = id; }
        ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

However, "SetGridId" is not used anywhere:

$ grep -r "SetGridId" .
./src/framework/GameSystem/NGrid.h:        void SetGridId(const uint32 id) const { i_gridId = id; }

This PR removes the obsolete SetGridId function, and by this also fixes the build.