summaryrefslogtreecommitdiff
path: root/assetFactory/object.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2024-06-04 21:14:45 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2024-06-04 21:14:45 +0100
commit6e94848aec5d42eed5f9e1f5548ade26915ce90b (patch)
treeb6cf5bc39f7da4c8853491da4008c29406b135f3 /assetFactory/object.cpp
parentTidy of glRef (diff)
downloadilt-6e94848aec5d42eed5f9e1f5548ade26915ce90b.tar.bz2
ilt-6e94848aec5d42eed5f9e1f5548ade26915ce90b.tar.xz
ilt-6e94848aec5d42eed5f9e1f5548ade26915ce90b.zip
Tidy many stringy messes with std::format
Diffstat (limited to 'assetFactory/object.cpp')
-rw-r--r--assetFactory/object.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/assetFactory/object.cpp b/assetFactory/object.cpp
index f48dcf6..f87a487 100644
--- a/assetFactory/object.cpp
+++ b/assetFactory/object.cpp
@@ -1,5 +1,6 @@
#include "object.h"
#include <algorithm>
+#include <format>
Object::Object(std::string i) : id {std::move(i)} { }
@@ -10,7 +11,7 @@ Object::createMesh(ModelFactoryMesh & mesh, Scale3D levelOfDetailFactor) const
for (const auto & use : uses) {
auto useFaces = use->createMesh(mesh, levelOfDetailFactor);
std::transform(useFaces.begin(), useFaces.end(), std::inserter(faces, faces.end()), [this](auto && face) {
- return std::make_pair(id + ":" + face.first, std::move(face.second));
+ return std::make_pair(std::format("{}:{}", id, face.first), std::move(face.second));
});
}
return faces;