Merge branch 'main' into heightmaps

This commit is contained in:
MihailRis
2024-08-20 22:01:36 +03:00
5 changed files with 7 additions and 7 deletions
+2 -2
View File
@@ -106,14 +106,14 @@ public:
ContentUnitDefs(UptrsMap<std::string, T> defs) : defs(std::move(defs)) {
}
T* find(const std::string& id) const {
const T* find(const std::string& id) const {
const auto& found = defs.find(id);
if (found == defs.end()) {
return nullptr;
}
return found->second.get();
}
T& require(const std::string& id) const {
const T& require(const std::string& id) const {
const auto& found = defs.find(id);
if (found == defs.end()) {
throw std::runtime_error("missing content unit " + id);