mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
0032917: Coding Rules - eliminate MSVS warning C26440 on VS2019/C++20 (If your function may not throw, declare it noexcept)
Microsoft Visual Studio Professional 2019 Version 16.11.11 std=c++20 Get rid of warning C26440: "If your function may not throw, declare it noexcept" "If code is not supposed to cause any exceptions, it should be marked as such by using the 'noexcept' specifier. This would help to simplify error handling on the client code side, as well as enable compiler to do additional optimizations."
This commit is contained in:
@@ -71,7 +71,7 @@ namespace opencascade {
|
||||
}
|
||||
|
||||
//! Move constructor
|
||||
handle (handle&& theHandle) : entity(theHandle.entity)
|
||||
handle (handle&& theHandle) noexcept : entity(theHandle.entity)
|
||||
{
|
||||
theHandle.entity = 0;
|
||||
}
|
||||
@@ -112,7 +112,7 @@ namespace opencascade {
|
||||
}
|
||||
|
||||
//! Move operator
|
||||
handle& operator= (handle&& theHandle)
|
||||
handle& operator= (handle&& theHandle) noexcept
|
||||
{
|
||||
std::swap (this->entity, theHandle.entity);
|
||||
return *this;
|
||||
|
Reference in New Issue
Block a user