From 78997a9529f9ed7da000f9cb0618ccb336a521da Mon Sep 17 00:00:00 2001 From: a dinosaur Date: Mon, 25 Mar 2024 15:51:42 +1100 Subject: [PATCH] Fix build errors on MSVC from sanitisation commit --- src/headerwriter.cpp | 1 + src/tmx2gba.cpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/headerwriter.cpp b/src/headerwriter.cpp index 49e0ab7..0d658a9 100644 --- a/src/headerwriter.cpp +++ b/src/headerwriter.cpp @@ -1,6 +1,7 @@ /* headerwriter.cpp - Copyright (C) 2015-2024 a dinosaur (zlib, see COPYING.txt) */ #include "headerwriter.hpp" +#include template static constexpr std::string_view DatType(); diff --git a/src/tmx2gba.cpp b/src/tmx2gba.cpp index a3952c4..c5c04b1 100644 --- a/src/tmx2gba.cpp +++ b/src/tmx2gba.cpp @@ -116,7 +116,7 @@ static bool ParseArgs(int argc, char** argv, Arguments& params) } -static std::string SanitiseLabel(const std::string& ident) +static std::string SanitiseLabel(const std::string_view ident) { std::string out; out.reserve(ident.length()); @@ -203,7 +203,7 @@ int main(int argc, char** argv) } // Get name from file - std::string name = SanitiseLabel(std::filesystem::path(p.outPath).stem()); + std::string name = SanitiseLabel(std::filesystem::path(p.outPath).stem().string()); // Open output files SWriter outS;