Skip to content

Commit

Permalink
Merge pull request OpenRCT2#20657 from ZehMatt/common-junk-2
Browse files Browse the repository at this point in the history
Remove some macros from common.h
  • Loading branch information
ZehMatt authored Jul 27, 2023
2 parents d2db5f0 + cc89104 commit 19118de
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 21 deletions.
20 changes: 0 additions & 20 deletions src/openrct2/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,26 +121,6 @@ constexpr int32_t operator"" _mph(long double speedMph)

using StringId = uint16_t;

#define SafeFree(x) \
do \
{ \
free(x); \
(x) = nullptr; \
} while (false)

#define SafeDelete(x) \
do \
{ \
delete (x); \
(x) = nullptr; \
} while (false)
#define SafeDeleteArray(x) \
do \
{ \
delete[](x); \
(x) = nullptr; \
} while (false)

#define abstract = 0

#if defined(__GNUC__) && (defined(__x86_64__) || defined(__i386__))
Expand Down
2 changes: 1 addition & 1 deletion src/openrct2/scenario/ScenarioRepository.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ static int32_t ScenarioIndexEntryCompareByIndex(const ScenarioIndexEntry& entryA

static void ScenarioHighscoreFree(ScenarioHighscoreEntry* highscore)
{
SafeDelete(highscore);
delete highscore;
}

class ScenarioFileIndex final : public FileIndex<ScenarioIndexEntry>
Expand Down

0 comments on commit 19118de

Please sign in to comment.