From 41ebf62fb13785fd9b2be138aa694bfa63dcf8b5 Mon Sep 17 00:00:00 2001 From: scrawl Date: Fri, 5 Feb 2016 00:25:14 +0100 Subject: [PATCH] Accept a const CellStore in getNorthVector --- apps/openmw/mwbase/world.hpp | 2 +- apps/openmw/mwworld/worldimp.cpp | 4 ++-- apps/openmw/mwworld/worldimp.hpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/openmw/mwbase/world.hpp b/apps/openmw/mwbase/world.hpp index 06a8ffa352..c2a7de72b2 100644 --- a/apps/openmw/mwbase/world.hpp +++ b/apps/openmw/mwbase/world.hpp @@ -141,7 +141,7 @@ namespace MWBase virtual bool isCellQuasiExterior() const = 0; - virtual osg::Vec2f getNorthVector (MWWorld::CellStore* cell) = 0; + virtual osg::Vec2f getNorthVector (const MWWorld::CellStore* cell) = 0; ///< get north vector for given interior cell virtual void getDoorMarkers (MWWorld::CellStore* cell, std::vector& out) = 0; diff --git a/apps/openmw/mwworld/worldimp.cpp b/apps/openmw/mwworld/worldimp.cpp index 37743bceb0..a556aabf7c 100644 --- a/apps/openmw/mwworld/worldimp.cpp +++ b/apps/openmw/mwworld/worldimp.cpp @@ -1710,9 +1710,9 @@ namespace MWWorld mWeatherManager->modRegion(regionid, chances); } - osg::Vec2f World::getNorthVector (CellStore* cell) + osg::Vec2f World::getNorthVector (const CellStore* cell) { - MWWorld::Ptr northmarker = cell->search("northmarker"); + MWWorld::ConstPtr northmarker = cell->searchConst("northmarker"); if (northmarker.isEmpty()) return osg::Vec2f(0, 1); diff --git a/apps/openmw/mwworld/worldimp.hpp b/apps/openmw/mwworld/worldimp.hpp index a9dce46e87..487d4ed04d 100644 --- a/apps/openmw/mwworld/worldimp.hpp +++ b/apps/openmw/mwworld/worldimp.hpp @@ -227,7 +227,7 @@ namespace MWWorld virtual bool isCellQuasiExterior() const; - virtual osg::Vec2f getNorthVector (CellStore* cell); + virtual osg::Vec2f getNorthVector (const CellStore* cell); ///< get north vector for given interior cell virtual void getDoorMarkers (MWWorld::CellStore* cell, std::vector& out);