mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-27 17:28:41 +00:00
Move AreaStore container selection logic into getOptimalImplementation
This commit is contained in:
parent
0079887b64
commit
2e74e9ee20
3 changed files with 13 additions and 9 deletions
|
@ -44,6 +44,16 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
AST_OVERLAPS_IN_DIMENSION((amine), (amaxe), (b), Y) && \
|
||||
AST_OVERLAPS_IN_DIMENSION((amine), (amaxe), (b), Z))
|
||||
|
||||
|
||||
AreaStore *AreaStore::getOptimalImplementation()
|
||||
{
|
||||
#if USE_SPATIAL
|
||||
return new SpatialAreaStore();
|
||||
#else
|
||||
return new VectorAreaStore();
|
||||
#endif
|
||||
}
|
||||
|
||||
u16 AreaStore::size() const
|
||||
{
|
||||
return areas_map.size();
|
||||
|
|
|
@ -52,7 +52,6 @@ struct Area {
|
|||
std::string data;
|
||||
};
|
||||
|
||||
std::vector<std::string> get_areastore_typenames();
|
||||
|
||||
class AreaStore {
|
||||
protected:
|
||||
|
@ -93,6 +92,8 @@ public:
|
|||
|
||||
const Area *getArea(u32 id) const;
|
||||
u16 size() const;
|
||||
|
||||
static AreaStore *getOptimalImplementation();
|
||||
#if 0
|
||||
bool deserialize(std::istream &is);
|
||||
void serialize(std::ostream &is) const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue