diff options
author | Steph Enders <smenders@gmail.com> | 2022-06-27 17:45:44 -0400 |
---|---|---|
committer | Steph Enders <smenders@gmail.com> | 2022-06-27 17:45:44 -0400 |
commit | 38d46b2dda0243cfa60bc6945859ebd587e0a851 (patch) | |
tree | 3af0286199c6075ad50c36f2218c1c303f9fa921 /src/CApi.h | |
parent | 734ee0f6352fdb6077c142d90f191c11c32f98d2 (diff) |
Update MacOS to compile w/ Boost
MacOS seems to rely on an older/different C++ stdlib than Windows or
Linux. So replacing those with Boost equivalents.
Mostly contained to the Resources thankfully!
Diffstat (limited to 'src/CApi.h')
-rw-r--r-- | src/CApi.h | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -203,7 +203,16 @@ static int c_get_treasures(lua_State *L) { static int c_score_treasure(lua_State *L) { int id = static_cast<int>(lua_tonumber(L, -1)); +#ifdef __APPLE__ + for (int i = 0; i < lvl->treasurePositions.size(); i++) { + if (lvl->treasurePositions[i].id == id) { + lvl->treasurePositions.erase(lvl->treasurePositions.begin() + i); + break; + } + } +#else erase_if(lvl->treasurePositions, [id](Pos t) { return t.id == id; }); +#endif return 1; } |