mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-08 20:41:49 +00:00
feat: world files resources file loading
This commit is contained in:
parent
a013e7eefd
commit
9623f35862
5 changed files with 48 additions and 8 deletions
|
|
@ -117,7 +117,7 @@ public:
|
|||
: savedData(std::make_unique<std::vector<dynamic::Map_sptr>>()){
|
||||
}
|
||||
|
||||
static constexpr size_t MISSING = -1;
|
||||
static constexpr size_t MISSING = SIZE_MAX;
|
||||
|
||||
void add(std::string name, dynamic::Map_sptr map) {
|
||||
indices[name] = names.size();
|
||||
|
|
@ -131,7 +131,7 @@ public:
|
|||
|
||||
size_t indexOf(const std::string& name) const {
|
||||
const auto& found = indices.find(name);
|
||||
if (found == indices.end()) {
|
||||
if (found != indices.end()) {
|
||||
return found->second;
|
||||
}
|
||||
return MISSING;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue