From 62172828e4114437b88456dd12d90066fde458df Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 13 Nov 2022 18:02:05 +0100 Subject: use new pair destructuring operator --- editor/tile-editor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/editor/tile-editor.cpp b/editor/tile-editor.cpp index d89a291d..9f9b6571 100644 --- a/editor/tile-editor.cpp +++ b/editor/tile-editor.cpp @@ -6,7 +6,7 @@ #include "random.hpp" #include "serialize/json-helper.hpp" #include "serialize/tile-atlas.hpp" -#include +#include #include namespace floormat { @@ -22,7 +22,7 @@ void tile_editor::load_atlases() const auto filename = _name + ".json"; for (auto& atlas : json_helper::from_json(Path::join(loader_::IMAGE_PATH, filename))) { - const StringView name = Path::splitExtension(atlas->name()).first(); + const auto [name, _ext] = Path::splitExtension(atlas->name()); auto& [_, vec] = _permutation; vec.reserve(atlas->num_tiles()); _atlases[name] = atlas; -- cgit v1.2.3