summaryrefslogtreecommitdiffhomepage
path: root/editor
diff options
context:
space:
mode:
Diffstat (limited to 'editor')
-rw-r--r--editor/vobj-editor.cpp6
-rw-r--r--editor/vobj-editor.hpp4
2 files changed, 5 insertions, 5 deletions
diff --git a/editor/vobj-editor.cpp b/editor/vobj-editor.cpp
index cab9c0e1..6dc8c907 100644
--- a/editor/vobj-editor.cpp
+++ b/editor/vobj-editor.cpp
@@ -128,13 +128,13 @@ bptr<object> hole_factory::make(world& w, object_id id, global_coords pos) const
auto vobj_editor::make_vobj_type_map() -> std::map<String, vobj_>
{
- constexpr auto add = [](auto& m, std::unique_ptr<vobj_factory>&& x) {
+ constexpr auto add = [](auto& m, Pointer<vobj_factory>&& x) {
StringView name = x->name(), descr = x->descr();
m[name] = vobj_editor::vobj_{ name, descr, move(x) };
};
std::map<String, vobj_> map;
- add(map, std::make_unique<light_factory>());
- add(map, std::make_unique<hole_factory>());
+ add(map, Pointer<light_factory>{InPlace});
+ add(map, Pointer<hole_factory>{InPlace});
return map;
}
diff --git a/editor/vobj-editor.hpp b/editor/vobj-editor.hpp
index c614b4e7..0c6d8fcd 100644
--- a/editor/vobj-editor.hpp
+++ b/editor/vobj-editor.hpp
@@ -2,9 +2,9 @@
#include "src/object-type.hpp"
#include "src/object-id.hpp"
#include "compat/borrowed-ptr-fwd.hpp"
-#include <memory>
#include <map>
#include <cr/String.h>
+#include <cr/Pointer.h>
namespace floormat {
@@ -33,7 +33,7 @@ class vobj_editor final
public:
struct vobj_ final {
String name, descr;
- std::unique_ptr<vobj_factory> factory;
+ Pointer<vobj_factory> factory;
};
vobj_editor();