summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-11-10 21:27:08 +0100
committerStanislaw Halik <sthalik@misaki.pl>2022-11-10 22:17:43 +0100
commitee1a527191db646850ee919b8fe3a6f8cb6cd693 (patch)
treea1ff23b8c0f93d689d51d3837caefaa72b9480cd /src
parent0e23ba9e5a565e34fee0f024e29ce162f420ec22 (diff)
get rid of std::string
Diffstat (limited to 'src')
-rw-r--r--src/anim-atlas.hpp4
-rw-r--r--src/precomp.hpp3
-rw-r--r--src/tile-atlas.cpp1
-rw-r--r--src/tile-atlas.hpp7
4 files changed, 6 insertions, 9 deletions
diff --git a/src/anim-atlas.hpp b/src/anim-atlas.hpp
index 40cc15fe..d05bbe77 100644
--- a/src/anim-atlas.hpp
+++ b/src/anim-atlas.hpp
@@ -3,7 +3,7 @@
#include "scenery.hpp"
#include "serialize/anim.hpp"
#include <array>
-#include <string>
+#include <Corrade/Containers/String.h>
#include <Magnum/Math/Vector2.h>
#include <Magnum/ImageView.h>
#include <Magnum/GL/Texture.h>
@@ -38,7 +38,7 @@ struct anim_atlas final
private:
GL::Texture2D _tex;
- std::string _name;
+ String _name;
anim_info _info;
std::array<std::uint8_t, (std::size_t)rotation::COUNT> _group_indices = {
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
diff --git a/src/precomp.hpp b/src/precomp.hpp
index 5d46092e..5ec264a4 100644
--- a/src/precomp.hpp
+++ b/src/precomp.hpp
@@ -29,14 +29,13 @@
#include <optional>
#include <vector>
#include <unordered_map>
-#include <string>
#include <Corrade/Containers/Array.h>
#include <Corrade/Containers/ArrayView.h>
#include <Corrade/Containers/StringView.h>
#include <Corrade/Containers/Pointer.h>
#include <Corrade/Containers/ArrayViewStl.h> // TODO maybe remove stl
-#include <Corrade/Containers/StringStl.h> // TODO remove stl
+#include <Corrade/Containers/StringStlHash.h>
#include <Corrade/Utility/DebugStl.h>
#include <Magnum/Magnum.h>
diff --git a/src/tile-atlas.cpp b/src/tile-atlas.cpp
index 15bb9439..44efd45b 100644
--- a/src/tile-atlas.cpp
+++ b/src/tile-atlas.cpp
@@ -3,7 +3,6 @@
#include "compat/assert.hpp"
#include "tile-image.hpp"
#include <limits>
-#include <Corrade/Containers/StringStl.h>
#include <Magnum/Math/Color.h>
#include <Magnum/ImageView.h>
#include <Magnum/GL/TextureFormat.h>
diff --git a/src/tile-atlas.hpp b/src/tile-atlas.hpp
index 5856f3bb..55546017 100644
--- a/src/tile-atlas.hpp
+++ b/src/tile-atlas.hpp
@@ -1,10 +1,9 @@
#pragma once
+#include <array>
+#include <memory>
#include <Corrade/Containers/String.h>
#include <Magnum/Magnum.h>
#include <Magnum/GL/Texture.h>
-#include <array>
-#include <string>
-#include <memory>
namespace floormat {
@@ -32,7 +31,7 @@ private:
std::unique_ptr<const texcoords[]> texcoords_;
GL::Texture2D tex_;
- std::string name_;
+ String name_;
Vector2ui size_;
Vector2ub dims_;
};