diff options
author | Jozef Behran <jozuejozef@gmail.com> | 2019-08-13 19:58:27 +0200 |
---|---|---|
committer | SmallJoker <SmallJoker@users.noreply.github.com> | 2019-08-13 19:58:27 +0200 |
commit | 72b7a957af331c7481a60705d1a35a78b5afb494 (patch) | |
tree | ab862023f10383403daa2962f087d0890e187e76 /src/map.h | |
parent | 539f016c1b1a706da2c113435ec60bb39c868f4b (diff) | |
download | minetest-72b7a957af331c7481a60705d1a35a78b5afb494.tar.gz minetest-72b7a957af331c7481a60705d1a35a78b5afb494.tar.bz2 minetest-72b7a957af331c7481a60705d1a35a78b5afb494.zip |
Fix unnecessary exception use in Map::getSectorXXX (#8792)
The Map::getSectorNoGenerate throws an exception but no other
code is really dependent on that. Fix the odd instance of
misuse in ClientMap::emergeSector and remove the exception
throwing version of the method along with the "NoEx" suffixes
in the names of these methods.
Diffstat (limited to 'src/map.h')
-rw-r--r-- | src/map.h | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -155,10 +155,8 @@ public: void dispatchEvent(MapEditEvent *event); // On failure returns NULL - MapSector * getSectorNoGenerateNoExNoLock(v2s16 p2d); + MapSector * getSectorNoGenerateNoLock(v2s16 p2d); // Same as the above (there exists no lock anymore) - MapSector * getSectorNoGenerateNoEx(v2s16 p2d); - // On failure throws InvalidPositionException MapSector * getSectorNoGenerate(v2s16 p2d); // Gets an existing sector or creates an empty one //MapSector * getSectorCreate(v2s16 p2d); |