From 78a3eec9be053a1f82cf2e6235bbaa4deb4a1335 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Wed, 28 Feb 2024 18:29:02 +0100 Subject: switch to using unqualified calls to {move,forward,swap} --- loader/anim-traits.cpp | 7 +++---- loader/atlas-loader.inl | 7 +++---- loader/error-tex.cpp | 2 +- loader/filesystem.cpp | 2 +- loader/texture.cpp | 2 +- loader/vobj.cpp | 6 +++--- loader/wall-traits.cpp | 4 ++-- 7 files changed, 14 insertions(+), 16 deletions(-) (limited to 'loader') diff --git a/loader/anim-traits.cpp b/loader/anim-traits.cpp index 2fe706ed..524f4c24 100644 --- a/loader/anim-traits.cpp +++ b/loader/anim-traits.cpp @@ -7,7 +7,6 @@ #include "serialize/json-helper.hpp" #include "serialize/anim.hpp" #include "compat/exception.hpp" -#include #include #include #include @@ -53,12 +52,12 @@ auto anim_traits::make_invalid_atlas(Storage& s) -> Cell auto def = anim_def { .object_name = loader.INVALID, .anim_name = loader.INVALID, - .groups = Utility::move(groups), + .groups = move(groups), .pixel_size = size, .scale = anim_scale::fixed{size.x(), true}, .nframes = 1, }; - auto atlas = std::make_shared(loader.INVALID, loader.make_error_texture(size), std::move(def)); + auto atlas = std::make_shared(loader.INVALID, loader.make_error_texture(size), move(def)); auto info = anim_cell { .atlas = atlas, .name = loader.INVALID, @@ -97,7 +96,7 @@ auto anim_traits::make_atlas(StringView name, const Cell&) -> std::shared_ptr(name, tex, std::move(anim_info)); + auto atlas = std::make_shared(name, tex, move(anim_info)); return atlas; } diff --git a/loader/atlas-loader.inl b/loader/atlas-loader.inl index 490ff3a4..8b5f9595 100644 --- a/loader/atlas-loader.inl +++ b/loader/atlas-loader.inl @@ -8,14 +8,13 @@ #include #include #include -#include #include namespace floormat::loader_detail { template atlas_loader::atlas_loader(TRAITS&& traits): // NOLINT(*-rvalue-reference-param-not-moved) - t{Utility::move(traits)} + t{move(traits)} { arrayReserve(s.missing_atlas_names, 8); } @@ -138,7 +137,7 @@ auto atlas_loader::get_atlas(StringView name, const loader_policy fm_assert(!t.atlas_of(*c_)); fm_assert(t.name_of(*c_) == name); const size_t index{s.cell_array.size()}; - arrayAppend(s.cell_array, Utility::move(*c_)); + arrayAppend(s.cell_array, move(*c_)); Cell& c{s.cell_array.back()}; String& name_{t.name_of(c)}; if (name_.isSmall()) name_ = String{AllocatedInit, name_}; @@ -223,7 +222,7 @@ void atlas_loader::register_cell(Cell&& c) fm_assert(!s.name_map.contains(name)); fm_soft_assert(loader.check_atlas_name(name)); const size_t index{s.cell_array.size()}; - arrayAppend(s.cell_array, Utility::move(c)); + arrayAppend(s.cell_array, move(c)); if (String& name_ = t.name_of(s.cell_array.back()); name_.isSmall()) name_ = String{AllocatedInit, name_}; s.name_map[ t.name_of(s.cell_array.back()) ] = index; } diff --git a/loader/error-tex.cpp b/loader/error-tex.cpp index 16df2b43..dac5992c 100644 --- a/loader/error-tex.cpp +++ b/loader/error-tex.cpp @@ -18,7 +18,7 @@ Trade::ImageData2D loader_impl::make_error_texture(Vector2ui size) *(Vector4ub*)data = magenta; data += 4; } - auto img = Trade::ImageData2D{PixelFormat::RGBA8Unorm, Vector2i(size), std::move(array)}; + auto img = Trade::ImageData2D{PixelFormat::RGBA8Unorm, Vector2i(size), move(array)}; return img; } diff --git a/loader/filesystem.cpp b/loader/filesystem.cpp index be3aa1df..009a3d22 100644 --- a/loader/filesystem.cpp +++ b/loader/filesystem.cpp @@ -49,7 +49,7 @@ void loader_impl::set_application_working_directory() return; once = true; if (auto loc = Path::currentDirectory(); loc) - original_working_directory = std::move(*loc); + original_working_directory = move(*loc); else { auto err = error_string(); diff --git a/loader/texture.cpp b/loader/texture.cpp index e93b21af..0da6f1e7 100644 --- a/loader/texture.cpp +++ b/loader/texture.cpp @@ -40,7 +40,7 @@ Trade::ImageData2D loader_impl::texture(StringView prefix, StringView filename_) auto img = importer->image2D(0); if (!img) fm_abort("can't allocate image for '%s'", buf); - auto ret = std::move(*img); + auto ret = move(*img); return ret; } } diff --git a/loader/vobj.cpp b/loader/vobj.cpp index 010cc642..f09c9581 100644 --- a/loader/vobj.cpp +++ b/loader/vobj.cpp @@ -70,9 +70,9 @@ std::shared_ptr loader_impl::make_vobj_anim_atlas(StringView n }, }; def.groups = Array{1}; - def.groups[0] = std::move(group); + def.groups[0] = move(group); } - auto atlas = std::make_shared(name, tex, std::move(def)); + auto atlas = std::make_shared(name, tex, move(def)); return atlas; } @@ -92,7 +92,7 @@ void loader_impl::get_vobj_list() { auto atlas = make_vobj_anim_atlas(name, img_name); auto info = vobj_cell{name, descr, atlas}; - vobjs.push_back(std::move(info)); + vobjs.push_back(move(info)); const auto& x = vobjs.back(); vobj_atlas_map[x.atlas->name()] = &x; } diff --git a/loader/wall-traits.cpp b/loader/wall-traits.cpp index 37056746..9bf23ff9 100644 --- a/loader/wall-traits.cpp +++ b/loader/wall-traits.cpp @@ -42,7 +42,7 @@ auto wall_traits::make_invalid_atlas(Storage& s) -> Cell {{ {.val = 0}, {}, }}, {1u}, }, name, loader.make_error_texture(frame_size)); - return { .atlas = std::move(a), .name = name, }; + return { .atlas = move(a), .name = name, }; } auto wall_traits::make_atlas(StringView name, const Cell&) -> std::shared_ptr @@ -56,7 +56,7 @@ auto wall_traits::make_atlas(StringView name, const Cell&) -> std::shared_ptr(std::move(def), file, tex); + auto atlas = std::make_shared(move(def), file, tex); return atlas; } -- cgit v1.2.3