From 2a505b427d7b601873920948c65929f1f4795149 Mon Sep 17 00:00:00 2001 From: Allofich Date: Sun, 26 Mar 2017 18:33:37 +0900 Subject: [PATCH 1/3] Remove second LAND_SIZE definition --- components/esm/loadland.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/components/esm/loadland.cpp b/components/esm/loadland.cpp index 0869eb7be..72c3eb98d 100644 --- a/components/esm/loadland.cpp +++ b/components/esm/loadland.cpp @@ -335,7 +335,4 @@ namespace ESM } } } - - const int Land::LAND_SIZE; - } From db2f97f308730c45919e8a3dec4e33ab1c8f8f21 Mon Sep 17 00:00:00 2001 From: Allofich Date: Mon, 27 Mar 2017 03:47:17 +0900 Subject: [PATCH 2/3] Fix shadowing warning --- apps/openmw/mwrender/objects.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/openmw/mwrender/objects.cpp b/apps/openmw/mwrender/objects.cpp index ab627b6f6..d4cbf25fe 100644 --- a/apps/openmw/mwrender/objects.cpp +++ b/apps/openmw/mwrender/objects.cpp @@ -149,9 +149,9 @@ void Objects::removeCell(const MWWorld::CellStore* store) if (ptr.getClass().isNpc() && ptr.getRefData().getCustomData()) { - MWWorld::InventoryStore& store = ptr.getClass().getInventoryStore(ptr); - store.setInvListener(NULL, ptr); - store.setContListener(NULL); + MWWorld::InventoryStore& invStore = ptr.getClass().getInventoryStore(ptr); + invStore.setInvListener(NULL, ptr); + invStore.setContListener(NULL); } mObjects.erase(iter++); From 3780d94214332beb37be4a4019ee4e366d4947a1 Mon Sep 17 00:00:00 2001 From: Allofich Date: Mon, 27 Mar 2017 20:23:40 +0900 Subject: [PATCH 3/3] Cast LAND_SIZE to integer to avoid linking error --- components/esmterrain/storage.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/esmterrain/storage.cpp b/components/esmterrain/storage.cpp index 4af1c4c0d..63efb36be 100644 --- a/components/esmterrain/storage.cpp +++ b/components/esmterrain/storage.cpp @@ -240,8 +240,8 @@ namespace ESMTerrain // Only relevant for chunks smaller than (contained in) one cell rowStart += (origin.x() - startCellX) * ESM::Land::LAND_SIZE; colStart += (origin.y() - startCellY) * ESM::Land::LAND_SIZE; - int rowEnd = std::min(static_cast(rowStart + std::min(1.f, size) * (ESM::Land::LAND_SIZE-1) + 1), ESM::Land::LAND_SIZE); - int colEnd = std::min(static_cast(colStart + std::min(1.f, size) * (ESM::Land::LAND_SIZE-1) + 1), ESM::Land::LAND_SIZE); + int rowEnd = std::min(static_cast(rowStart + std::min(1.f, size) * (ESM::Land::LAND_SIZE-1) + 1), static_cast(ESM::Land::LAND_SIZE)); + int colEnd = std::min(static_cast(colStart + std::min(1.f, size) * (ESM::Land::LAND_SIZE-1) + 1), static_cast(ESM::Land::LAND_SIZE)); vertY = vertY_; for (int col=colStart; col