From 066e9af1bcdef0a7931391f6ece341deeb229807 Mon Sep 17 00:00:00 2001 From: Jan Date: Sat, 6 Aug 2022 19:10:26 +0200 Subject: [PATCH] fix compilation on gcc --- src/ObjLoading/AssetLoading/AbstractGdtEntryReader.cpp | 5 ++--- src/ObjLoading/AssetLoading/AbstractGdtEntryReader.h | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/ObjLoading/AssetLoading/AbstractGdtEntryReader.cpp b/src/ObjLoading/AssetLoading/AbstractGdtEntryReader.cpp index f6e834d9..5c1ae860 100644 --- a/src/ObjLoading/AssetLoading/AbstractGdtEntryReader.cpp +++ b/src/ObjLoading/AssetLoading/AbstractGdtEntryReader.cpp @@ -3,12 +3,11 @@ #include GdtReadingException::GdtReadingException(std::string message) - : exception(message.c_str()), - m_message(std::move(message)) + : m_message(std::move(message)) { } -const char* GdtReadingException::what() const +const char* GdtReadingException::what() const noexcept { return m_message.c_str(); } diff --git a/src/ObjLoading/AssetLoading/AbstractGdtEntryReader.h b/src/ObjLoading/AssetLoading/AbstractGdtEntryReader.h index 10d4a54e..e731380b 100644 --- a/src/ObjLoading/AssetLoading/AbstractGdtEntryReader.h +++ b/src/ObjLoading/AssetLoading/AbstractGdtEntryReader.h @@ -9,7 +9,7 @@ class GdtReadingException : public std::exception { public: explicit GdtReadingException(std::string message); - _NODISCARD const char* what() const override; + _NODISCARD const char* what() const noexcept override; private: std::string m_message;