From d52e2f68cdd8c14a740d8174dac77a3f2e376146 Mon Sep 17 00:00:00 2001 From: Marc Zinnschlag Date: Fri, 20 Aug 2010 12:52:51 +0200 Subject: [PATCH] added searchExt function to cell RecList --- components/esm_store/reclists.hpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/components/esm_store/reclists.hpp b/components/esm_store/reclists.hpp index 3cdb7f7b2..3711a20b1 100644 --- a/components/esm_store/reclists.hpp +++ b/components/esm_store/reclists.hpp @@ -194,6 +194,21 @@ namespace ESMS return it->second; } + const Cell *searchExt (int x, int y) const + { + ExtCells::const_iterator it = extCells.find (x); + + if (it==extCells.end()) + return 0; + + ExtCellsCol::const_iterator it2 = it->second.find (y); + + if (it2 == it->second.end()) + return 0; + + return it2->second; + } + void load(ESMReader &esm, const std::string &id) { using namespace std;