mirror of
https://github.com/overte-org/overte.git
synced 2025-04-08 02:14:26 +02:00
macro NOEXCEPT for ktx on msvc
This commit is contained in:
parent
3a0e13387d
commit
748d7c0ce4
2 changed files with 13 additions and 2 deletions
|
@ -13,11 +13,17 @@
|
|||
#include <list>
|
||||
#include <QtGlobal>
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#define NOEXCEPT noexcept
|
||||
#else
|
||||
#define NOEXCEPT
|
||||
#endif
|
||||
|
||||
namespace ktx {
|
||||
class ReaderException: public std::exception {
|
||||
public:
|
||||
ReaderException(const std::string& explanation) : _explanation("KTX deserialization error: " + explanation) {}
|
||||
const char* what() const noexcept override { return _explanation.c_str(); }
|
||||
const char* what() const NOEXCEPT override { return _explanation.c_str(); }
|
||||
private:
|
||||
const std::string _explanation;
|
||||
};
|
||||
|
|
|
@ -10,13 +10,18 @@
|
|||
//
|
||||
#include "KTX.h"
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#define NOEXCEPT noexcept
|
||||
#else
|
||||
#define NOEXCEPT
|
||||
#endif
|
||||
|
||||
namespace ktx {
|
||||
|
||||
class WriterException : public std::exception {
|
||||
public:
|
||||
WriterException(const std::string& explanation) : _explanation("KTX serialization error: " + explanation) {}
|
||||
const char* what() const noexcept override { return _explanation.c_str(); }
|
||||
const char* what() const NOEXCEPT override { return _explanation.c_str(); }
|
||||
private:
|
||||
const std::string _explanation;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue