From e4a1b6b5b891d3f98a7ebbadc332638d8795499e Mon Sep 17 00:00:00 2001 From: Thunderforge Date: Sat, 16 Dec 2017 14:36:27 -0600 Subject: [PATCH 1/2] Explicitly setting CMAKE_CXX_STANDARD to C++11 --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1593dda2b..1fc9f5016 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -338,6 +338,7 @@ if (NOT WIN32 AND NOT APPLE) endif() # CXX Compiler settings +set(CMAKE_CXX_STANDARD 11) if (CMAKE_CXX_COMPILER_ID STREQUAL GNU OR CMAKE_CXX_COMPILER_ID STREQUAL Clang) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wundef -Wno-unused-parameter -std=c++11 -pedantic -Wno-long-long") add_definitions( -DBOOST_NO_CXX11_SCOPED_ENUMS=ON ) From 1a58171e86b90d1498808facfc955d35288730eb Mon Sep 17 00:00:00 2001 From: Andrei Kortunov Date: Sun, 17 Dec 2017 18:09:25 +0400 Subject: [PATCH 2/2] Do not allow to sell items from containers with zero capacity (bug #4268) --- apps/openmw/mwworld/worldimp.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/apps/openmw/mwworld/worldimp.cpp b/apps/openmw/mwworld/worldimp.cpp index 2d38f1518..340876759 100644 --- a/apps/openmw/mwworld/worldimp.cpp +++ b/apps/openmw/mwworld/worldimp.cpp @@ -2446,9 +2446,8 @@ namespace MWWorld if (ptr.getRefData().isDeleted()) return true; - // we should not sell ingrediends from owned organic containers - MWWorld::LiveCellRef* ref = ptr.get(); - if (ref && (ref->mBase->mFlags & ESM::Container::Organic)) + // vanilla Morrowind does not allow to sell items from containers with zero capacity + if (ptr.getClass().getCapacity(ptr) <= 0.f) return true; if (Misc::StringUtils::ciEqual(ptr.getCellRef().getOwner(), mOwner.getCellRef().getRefId()))