1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-02-20 19:39:41 +00:00

Merge branch 'deprecated-exception' into 'master'

Use C++11 exception specification

See merge request OpenMW/openmw!343
This commit is contained in:
psi29a 2020-10-13 13:31:48 +00:00
commit 9a912486f9
4 changed files with 14 additions and 14 deletions

View file

@ -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
};
}

View file

@ -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)

View file

@ -113,7 +113,7 @@ namespace DetourNavigator
std::map<std::thread::id, Queue> mThreadsQueues;
std::vector<std::thread> mThreads;
void process() throw();
void process() noexcept;
bool processJob(const Job& job);

View file

@ -10,22 +10,22 @@ namespace DetourNavigator
{
public:
template <class T>
explicit ObjectId(T* value) throw()
explicit ObjectId(T* value) noexcept
: mValue(reinterpret_cast<std::size_t>(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<DetourNavigator::ObjectId>
{
std::size_t operator ()(const DetourNavigator::ObjectId value) const throw()
std::size_t operator ()(const DetourNavigator::ObjectId value) const noexcept
{
return value.value();
}