modernize C++: use noexcept

This commit is contained in:
wmayer
2023-08-07 11:00:14 +02:00
committed by wwmayer
parent df93b14ec0
commit 31ed14db83
8 changed files with 55 additions and 53 deletions

View File

@@ -49,7 +49,7 @@ public:
explicit AttachEngineException(const char * sMessage);
explicit AttachEngineException(const std::string& sMessage);
/// Destruction
~AttachEngineException() throw() override {}
~AttachEngineException() noexcept override {}
};
/**

View File

@@ -465,7 +465,7 @@ class ExceptionCancel : public Base::Exception
public:
ExceptionCancel(){}
explicit ExceptionCancel(char* msg){this->setMessage(msg);}
~ExceptionCancel() throw() override {}
~ExceptionCancel() noexcept override {}
};
} // namespace Attacher

View File

@@ -57,7 +57,7 @@ public:
explicit NullShapeException(const char * sMessage);
explicit NullShapeException(const std::string& sMessage);
/// Destruction
~NullShapeException() throw() override {}
~NullShapeException() noexcept override {}
};
/* A special sub-class to indicate boolean failures
@@ -70,7 +70,7 @@ public:
explicit BooleanException(const char * sMessage);
explicit BooleanException(const std::string& sMessage);
/// Destruction
~BooleanException() throw() override {}
~BooleanException() noexcept override {}
};
class PartExport ShapeSegment : public Data::Segment

View File

@@ -59,7 +59,8 @@
#include "Utils.h"
#include "ViewProviderSketch.h"
// Hint: this is to prevent to re-format big parts of the file. Remove it later again.
// clang-format off
using namespace std;
using namespace SketcherGui;
using namespace Part;
@@ -83,7 +84,7 @@ public:
this->setMessage(ErrMsg);
}
~ExceptionWrongInput() throw() override
~ExceptionWrongInput() noexcept override
{}
QString ErrMsg;
@@ -1848,3 +1849,4 @@ void CreateSketcherCommands()
rcCmdMgr.addCommand(new CmdSketcherSnap());
rcCmdMgr.addCommand(new CmdRenderingOrder());
}
// clang-format on