summaryrefslogtreecommitdiffhomepage
path: root/loader
diff options
context:
space:
mode:
Diffstat (limited to 'loader')
-rw-r--r--loader/anim-traits.cpp7
-rw-r--r--loader/atlas-loader.inl7
-rw-r--r--loader/error-tex.cpp2
-rw-r--r--loader/filesystem.cpp2
-rw-r--r--loader/texture.cpp2
-rw-r--r--loader/vobj.cpp6
-rw-r--r--loader/wall-traits.cpp4
7 files changed, 14 insertions, 16 deletions
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 <cr/Move.h>
#include <cr/StringView.h>
#include <cr/GrowableArray.h>
#include <cr/StridedArrayView.h>
@@ -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<class anim_atlas>(loader.INVALID, loader.make_error_texture(size), std::move(def));
+ auto atlas = std::make_shared<class anim_atlas>(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<At
const auto width = size[1], height = size[0];
fm_soft_assert(anim_info.pixel_size[0] == width && anim_info.pixel_size[1] == height);
- auto atlas = std::make_shared<class anim_atlas>(name, tex, std::move(anim_info));
+ auto atlas = std::make_shared<class anim_atlas>(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 <memory>
#include <cr/ArrayView.h>
#include <cr/Optional.h>
-#include <cr/Move.h>
#include <cr/GrowableArray.h>
namespace floormat::loader_detail {
template<typename ATLAS, typename TRAITS>
atlas_loader<ATLAS, TRAITS>::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<ATLAS, TRAITS>::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<ATLAS, TRAITS>::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<class anim_atlas> loader_impl::make_vobj_anim_atlas(StringView n
},
};
def.groups = Array<anim_group>{1};
- def.groups[0] = std::move(group);
+ def.groups[0] = move(group);
}
- auto atlas = std::make_shared<class anim_atlas>(name, tex, std::move(def));
+ auto atlas = std::make_shared<class anim_atlas>(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<Atlas>
@@ -56,7 +56,7 @@ auto wall_traits::make_atlas(StringView name, const Cell&) -> std::shared_ptr<At
fm_soft_assert(name == def.header.name);
fm_soft_assert(!def.frames.isEmpty());
auto tex = loader.texture(""_s, file);
- auto atlas = std::make_shared<class wall_atlas>(std::move(def), file, tex);
+ auto atlas = std::make_shared<class wall_atlas>(move(def), file, tex);
return atlas;
}