From ee60d4bcea96ab5c8abcfc807bb242e29c68d5f4 Mon Sep 17 00:00:00 2001 From: elsid Date: Thu, 7 Nov 2019 22:08:15 +0100 Subject: [PATCH 1/2] Remove unused ItemStack::stacks --- apps/openmw/mwgui/itemmodel.cpp | 20 -------------------- apps/openmw/mwgui/itemmodel.hpp | 1 - 2 files changed, 21 deletions(-) diff --git a/apps/openmw/mwgui/itemmodel.cpp b/apps/openmw/mwgui/itemmodel.cpp index 5bbf74e26..cf88efaae 100644 --- a/apps/openmw/mwgui/itemmodel.cpp +++ b/apps/openmw/mwgui/itemmodel.cpp @@ -32,26 +32,6 @@ namespace MWGui { } - bool ItemStack::stacks(const ItemStack &other) - { - if(mBase == other.mBase) - return true; - - // If one of the items is in an inventory and currently equipped, we need to check stacking both ways to be sure - if (mBase.getContainerStore() && other.mBase.getContainerStore()) - return mBase.getContainerStore()->stacks(mBase, other.mBase) - && other.mBase.getContainerStore()->stacks(mBase, other.mBase); - - if (mBase.getContainerStore()) - return mBase.getContainerStore()->stacks(mBase, other.mBase); - if (other.mBase.getContainerStore()) - return other.mBase.getContainerStore()->stacks(mBase, other.mBase); - - MWWorld::ContainerStore store; - return store.stacks(mBase, other.mBase); - - } - bool operator == (const ItemStack& left, const ItemStack& right) { if (left.mType != right.mType) diff --git a/apps/openmw/mwgui/itemmodel.hpp b/apps/openmw/mwgui/itemmodel.hpp index 36432d479..4d923bae3 100644 --- a/apps/openmw/mwgui/itemmodel.hpp +++ b/apps/openmw/mwgui/itemmodel.hpp @@ -13,7 +13,6 @@ namespace MWGui { ItemStack (const MWWorld::Ptr& base, ItemModel* creator, size_t count); ItemStack(); - bool stacks (const ItemStack& other); ///< like operator==, only without checking mType enum Type From c59c8ae1f4282365fa07f2e5cbcdd8734f8d0d80 Mon Sep 17 00:00:00 2001 From: elsid Date: Mon, 20 Apr 2020 18:36:51 +0200 Subject: [PATCH 2/2] Remove unused macro --- components/sceneutil/detourdebugdraw.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/components/sceneutil/detourdebugdraw.cpp b/components/sceneutil/detourdebugdraw.cpp index b9c2fecef..7ef329fc1 100644 --- a/components/sceneutil/detourdebugdraw.cpp +++ b/components/sceneutil/detourdebugdraw.cpp @@ -7,9 +7,6 @@ #include #include -#define OPENMW_TO_STRING(X) #X -#define OPENMW_LINE_STRING OPENMW_TO_STRING(__LINE__) - namespace { using DetourNavigator::operator<<; @@ -121,6 +118,3 @@ namespace SceneUtil mColors->push_back(value); } } - -#undef OPENMW_TO_STRING -#undef OPENMW_LINE_STRING