X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Futil%2Fareastore.h;h=bebecfd78d4d332967b7f98bf69c658455bd4c14;hb=5cc8ad946efb3612eb6ea8655780b29fe4c62e19;hp=ab6bd76a3d9a37536b38b5b4827f9bdee5cd51a9;hpb=821551a2669123ac9a476894d65b5efe10026040;p=minetest.git diff --git a/src/util/areastore.h b/src/util/areastore.h index ab6bd76a3..bebecfd78 100644 --- a/src/util/areastore.h +++ b/src/util/areastore.h @@ -38,9 +38,9 @@ with this program; if not, write to the Free Software Foundation, Inc., struct Area { - Area() {} + Area() : id(U32_MAX) {} Area(const v3s16 &mine, const v3s16 &maxe) : - minedge(mine), maxedge(maxe) + id(U32_MAX), minedge(mine), maxedge(maxe) { sortBoxVerticies(minedge, maxedge); } @@ -68,7 +68,8 @@ class AreaStore { size_t size() const { return areas_map.size(); } /// Add an area to the store. - /// Updates the area's ID. + /// Updates the area's ID if it hasn't already been set. + /// @return Whether the area insertion was successful. virtual bool insertArea(Area *a) = 0; /// Removes an area from the store by ID.