diff --git a/components/compiler/exception.hpp b/components/compiler/exception.hpp index 33bad7590b..f21f2e5864 100644 --- a/components/compiler/exception.hpp +++ b/components/compiler/exception.hpp @@ -10,8 +10,8 @@ namespace Compiler class SourceException : public std::exception { public: - - virtual const char *what() const throw() { return "Compile error";} + + const char *what() const noexcept override { return "Compile error";} ///< Return error message }; @@ -20,18 +20,18 @@ namespace Compiler class FileException : public SourceException { public: - - virtual const char *what() const throw() { return "Can't read file"; } + + const char *what() const noexcept final { return "Can't read file"; } ///< Return error message }; /// \brief Exception: EOF condition encountered class EOFException : public SourceException - { + { public: - - virtual const char *what() const throw() { return "End of file"; } + + const char *what() const noexcept final { return "End of file"; } ///< Return error message }; } diff --git a/components/detournavigator/asyncnavmeshupdater.cpp b/components/detournavigator/asyncnavmeshupdater.cpp index 49339ebdff..878b8130a9 100644 --- a/components/detournavigator/asyncnavmeshupdater.cpp +++ b/components/detournavigator/asyncnavmeshupdater.cpp @@ -132,7 +132,7 @@ namespace DetourNavigator mNavMeshTilesCache.reportStats(frameNumber, stats); } - void AsyncNavMeshUpdater::process() throw() + void AsyncNavMeshUpdater::process() noexcept { Log(Debug::Debug) << "Start process navigator jobs by thread=" << std::this_thread::get_id(); while (!mShouldStop) diff --git a/components/detournavigator/asyncnavmeshupdater.hpp b/components/detournavigator/asyncnavmeshupdater.hpp index 4debcd6cd3..26f886512a 100644 --- a/components/detournavigator/asyncnavmeshupdater.hpp +++ b/components/detournavigator/asyncnavmeshupdater.hpp @@ -113,7 +113,7 @@ namespace DetourNavigator std::map mThreadsQueues; std::vector mThreads; - void process() throw(); + void process() noexcept; bool processJob(const Job& job); diff --git a/components/detournavigator/objectid.hpp b/components/detournavigator/objectid.hpp index 6ddcc9169d..9c4b5b2710 100644 --- a/components/detournavigator/objectid.hpp +++ b/components/detournavigator/objectid.hpp @@ -10,22 +10,22 @@ namespace DetourNavigator { public: template - explicit ObjectId(T* value) throw() + explicit ObjectId(T* value) noexcept : mValue(reinterpret_cast(value)) { } - std::size_t value() const throw() + std::size_t value() const noexcept { return mValue; } - friend bool operator <(const ObjectId lhs, const ObjectId rhs) throw() + friend bool operator <(const ObjectId lhs, const ObjectId rhs) noexcept { return lhs.mValue < rhs.mValue; } - friend bool operator ==(const ObjectId lhs, const ObjectId rhs) throw() + friend bool operator ==(const ObjectId lhs, const ObjectId rhs) noexcept { return lhs.mValue == rhs.mValue; } @@ -40,7 +40,7 @@ namespace std template <> struct hash { - std::size_t operator ()(const DetourNavigator::ObjectId value) const throw() + std::size_t operator ()(const DetourNavigator::ObjectId value) const noexcept { return value.value(); }