summaryrefslogtreecommitdiffhomepage
path: root/editor
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2024-02-28 18:29:02 +0100
committerStanislaw Halik <sthalik@misaki.pl>2024-02-28 20:13:32 +0100
commit78a3eec9be053a1f82cf2e6235bbaa4deb4a1335 (patch)
tree4539ba47695bc7b5fd974e2508067cb2fd168636 /editor
parent75508e3c03f659080df7db2211fb5a80cc1afeee (diff)
switch to using unqualified calls to {move,forward,swap}
Diffstat (limited to 'editor')
-rw-r--r--editor/app.cpp5
-rw-r--r--editor/ctor.cpp2
-rw-r--r--editor/ground-editor.cpp1
-rw-r--r--editor/inspect.cpp2
-rw-r--r--editor/inspect.hpp4
-rw-r--r--editor/tests/path-test.cpp2
-rw-r--r--editor/vobj-editor.cpp2
7 files changed, 8 insertions, 10 deletions
diff --git a/editor/app.cpp b/editor/app.cpp
index aa655612..db395b98 100644
--- a/editor/app.cpp
+++ b/editor/app.cpp
@@ -13,7 +13,6 @@
#include <cstring>
#include <Corrade/Containers/StringIterable.h>
#include <Corrade/Utility/Arguments.h>
-#include <Corrade/Utility/Move.h>
namespace floormat {
@@ -95,7 +94,7 @@ void app::reset_world(class world&& w_)
_render_vobjs = true;
_render_all_z_levels = true;
- auto& w = M->reset_world(Utility::move(w_));
+ auto& w = M->reset_world(move(w_));
w.collect(true);
ensure_player_character(w);
update_cursor_tile(pixel);
@@ -186,7 +185,7 @@ int app::run_from_argv(const int argc, const char* const* const argv)
opts.argv = argv;
opts.argc = argc;
- struct app* A = new app{Utility::move(opts)};
+ struct app* A = new app{move(opts)};
floormat_main* M = A->M;
fm_assert(M != nullptr);
ret = A->exec();
diff --git a/editor/ctor.cpp b/editor/ctor.cpp
index 36a35ae5..6b35b34c 100644
--- a/editor/ctor.cpp
+++ b/editor/ctor.cpp
@@ -10,7 +10,7 @@
namespace floormat {
app::app(fm_settings&& opts) :
- M{floormat_main::create(*this, Utility::move(opts))},
+ M{floormat_main::create(*this, move(opts))},
_imgui{InPlaceInit, NoCreate},
_wireframe{InPlaceInit},
_tests{tests_data_::make()},
diff --git a/editor/ground-editor.cpp b/editor/ground-editor.cpp
index 4c5316a0..49f636ce 100644
--- a/editor/ground-editor.cpp
+++ b/editor/ground-editor.cpp
@@ -122,7 +122,6 @@ void fisher_yates(T begin, T end)
for (auto i = N-1; i >= 1; i--)
{
const auto j = random(i+1);
- using std::swap;
swap(begin[i], begin[j]);
}
}
diff --git a/editor/inspect.cpp b/editor/inspect.cpp
index 29e7d193..d52ee5e2 100644
--- a/editor/inspect.cpp
+++ b/editor/inspect.cpp
@@ -54,7 +54,7 @@ int corrade_string_resize_callback(ImGuiInputTextCallbackData* data)
if ((size_t)data->BufSize > str.size()+1)
{
auto str2 = String{ValueInit, (size_t)data->BufSize};
- str = std::move(str2);
+ str = move(str2);
data->Buf = str.data();
}
}
diff --git a/editor/inspect.hpp b/editor/inspect.hpp
index df543f96..49abc5ce 100644
--- a/editor/inspect.hpp
+++ b/editor/inspect.hpp
@@ -7,9 +7,9 @@ struct erased_accessor;
template<typename T, typename Enum, Enum As>
struct field_repr_ final {
- field_repr_(T x) : value{std::move(x)} {}
+ field_repr_(T x) : value{move(x)} {}
field_repr_(const field_repr_<T, Enum, As>& other) noexcept = default;
- field_repr_& operator=(T x) noexcept { value = std::move(x); return *this; }
+ field_repr_& operator=(T x) noexcept { value = move(x); return *this; }
field_repr_& operator=(const field_repr_<T, Enum, As>& x) noexcept = default;
field_repr_& operator*() const noexcept { return value; }
operator T() const noexcept { return value; }
diff --git a/editor/tests/path-test.cpp b/editor/tests/path-test.cpp
index 68c7fee9..6bb89bef 100644
--- a/editor/tests/path-test.cpp
+++ b/editor/tests/path-test.cpp
@@ -161,7 +161,7 @@ void path_test::update_pre(app& a)
result = {
.from = pending.from,
.to = pending.to,
- .path = std::move(res.raw_path().vec),
+ .path = move(res.raw_path().vec),
.time = res.time(),
.cost = res.cost(),
.distance = res.distance(),
diff --git a/editor/vobj-editor.cpp b/editor/vobj-editor.cpp
index 0cfa64d6..f644ca1c 100644
--- a/editor/vobj-editor.cpp
+++ b/editor/vobj-editor.cpp
@@ -98,7 +98,7 @@ auto vobj_editor::make_vobj_type_map() -> std::map<String, vobj_>
{
constexpr auto add = [](auto& m, std::unique_ptr<vobj_factory>&& x) {
StringView name = x->name(), descr = x->descr();
- m[name] = vobj_editor::vobj_{ name, descr, std::move(x) };
+ m[name] = vobj_editor::vobj_{ name, descr, move(x) };
};
std::map<String, vobj_> map;
add(map, std::make_unique<light_factory>());