Move collectESM3References to unnamed namespace

esm4-texture
elsid 8 months ago
parent 524af5b723
commit 0040409a4d
No known key found for this signature in database
GPG Key ID: 4DE04C198CBA7625

@ -15,6 +15,7 @@
#include <components/esm3/esmreader.hpp>
#include <components/esm3/loadacti.hpp>
#include <components/esm3/loadcell.hpp>
#include <components/esm3/loadcont.hpp>
#include <components/esm3/loaddoor.hpp>
#include <components/esm3/loadstat.hpp>
@ -465,8 +466,10 @@ namespace MWRender
{
}
std::map<ESM::RefNum, ESM::CellRef> ObjectPaging::collectESM3References(
float size, const osg::Vec2i& startCell, ESM::ReadersCache& readers) const
namespace
{
std::map<ESM::RefNum, ESM::CellRef> collectESM3References(
float size, const osg::Vec2i& startCell, ESM::ReadersCache& readers)
{
std::map<ESM::RefNum, ESM::CellRef> refs;
const auto& store = MWBase::Environment::get().getWorld()->getStore();
@ -516,6 +519,7 @@ namespace MWRender
continue;
}
}
for (auto [ref, deleted] : cell->mLeasedRefs)
{
if (deleted)
@ -532,6 +536,7 @@ namespace MWRender
}
return refs;
}
}
osg::ref_ptr<osg::Node> ObjectPaging::createChunk(float size, const osg::Vec2f& center, bool activeGrid,
const osg::Vec3f& viewPoint, bool compile, unsigned char lod)

@ -1,7 +1,7 @@
#ifndef OPENMW_MWRENDER_OBJECTPAGING_H
#define OPENMW_MWRENDER_OBJECTPAGING_H
#include <components/esm3/loadcell.hpp>
#include <components/esm3/refnum.hpp>
#include <components/resource/resourcemanager.hpp>
#include <components/terrain/quadtreeworld.hpp>
@ -11,15 +11,6 @@ namespace Resource
{
class SceneManager;
}
namespace MWWorld
{
class ESMStore;
}
namespace ESM
{
class ReadersCache;
}
namespace MWRender
{
@ -82,9 +73,6 @@ namespace MWRender
const RefTracker& getRefTracker() const { return mRefTracker; }
RefTracker& getWritableRefTracker() { return mRefTrackerLocked ? mRefTrackerNew : mRefTracker; }
std::map<ESM::RefNum, ESM::CellRef> collectESM3References(
float size, const osg::Vec2i& startCell, ESM::ReadersCache& readers) const;
std::mutex mSizeCacheMutex;
typedef std::map<ESM::RefNum, float> SizeCache;
SizeCache mSizeCache;

Loading…
Cancel
Save