Fix unnecessary exception use in Map::isNodeUnderground
authorJozef Behran <jozuejozef@gmail.com>
Wed, 7 Aug 2019 10:06:45 +0000 (12:06 +0200)
committersfan5 <sfan5@live.de>
Tue, 13 Aug 2019 17:40:59 +0000 (19:40 +0200)
commite9ceead81dd989936e2de3ff7cd7496aecd09d39
tree51c94e2faf111ed63e40e5bc44d8ea5ea614b6c6
parent833e60d8d229a082e9841dc89494e6bda9cd5020
Fix unnecessary exception use in Map::isNodeUnderground

The isNodeUnderground calls getBlockNoCreate which calls
getBlockNoCreateNoEx and throws InvalidPositionException
if the returned value is nullptr, which isNodeUnderground
then catches to return "false". Remove the try..catch in
isNodeUnderground by calling getBlockNoCreateNoEx instead
of getBlockNoCreate and checking the returned value for
nullptr.
src/map.cpp