mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-02 17:46:22 +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:
parent
4e1b5fcbf0
commit
7b3f255f23
@ -65,7 +65,7 @@ public:
|
||||
}
|
||||
|
||||
//! Move constructor
|
||||
NCollection_AliasedArray (NCollection_AliasedArray&& theOther)
|
||||
NCollection_AliasedArray (NCollection_AliasedArray&& theOther) noexcept
|
||||
: myData (theOther.myData), myStride (theOther.myStride), mySize (theOther.mySize), myDeletable (theOther.myDeletable)
|
||||
{
|
||||
theOther.myDeletable = false;
|
||||
|
@ -85,14 +85,14 @@ public:
|
||||
Poly_ArrayOfNodes& operator= (const Poly_ArrayOfNodes& theOther) { return Assign (theOther); }
|
||||
|
||||
//! Move constructor
|
||||
Poly_ArrayOfNodes (Poly_ArrayOfNodes&& theOther)
|
||||
Poly_ArrayOfNodes (Poly_ArrayOfNodes&& theOther) noexcept
|
||||
: NCollection_AliasedArray (std::move (theOther))
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
//! Move assignment operator; @sa Move()
|
||||
Poly_ArrayOfNodes& operator= (Poly_ArrayOfNodes&& theOther)
|
||||
Poly_ArrayOfNodes& operator= (Poly_ArrayOfNodes&& theOther) noexcept
|
||||
{
|
||||
return Move (theOther);
|
||||
}
|
||||
|
@ -85,14 +85,14 @@ public:
|
||||
Poly_ArrayOfUVNodes& operator= (const Poly_ArrayOfUVNodes& theOther) { return Assign (theOther); }
|
||||
|
||||
//! Move constructor
|
||||
Poly_ArrayOfUVNodes (Poly_ArrayOfUVNodes&& theOther)
|
||||
Poly_ArrayOfUVNodes (Poly_ArrayOfUVNodes&& theOther) noexcept
|
||||
: NCollection_AliasedArray (std::move (theOther))
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
//! Move assignment operator; @sa Move()
|
||||
Poly_ArrayOfUVNodes& operator= (Poly_ArrayOfUVNodes&& theOther)
|
||||
Poly_ArrayOfUVNodes& operator= (Poly_ArrayOfUVNodes&& theOther) noexcept
|
||||
{
|
||||
return Move (theOther);
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -77,7 +77,7 @@ public:
|
||||
Standard_EXPORT TCollection_AsciiString(const TCollection_AsciiString& astring);
|
||||
|
||||
//! Move constructor
|
||||
TCollection_AsciiString (TCollection_AsciiString&& theOther)
|
||||
TCollection_AsciiString (TCollection_AsciiString&& theOther) noexcept
|
||||
: mystring (theOther.mystring),
|
||||
mylength (theOther.mylength)
|
||||
{
|
||||
@ -279,7 +279,7 @@ void operator = (const TCollection_AsciiString& fromwhere)
|
||||
Standard_EXPORT void Swap (TCollection_AsciiString& theOther);
|
||||
|
||||
//! Move assignment operator
|
||||
TCollection_AsciiString& operator= (TCollection_AsciiString&& theOther) { Swap (theOther); return *this; }
|
||||
TCollection_AsciiString& operator= (TCollection_AsciiString&& theOther) noexcept { Swap (theOther); return *this; }
|
||||
|
||||
//! Frees memory allocated by AsciiString.
|
||||
Standard_EXPORT ~TCollection_AsciiString();
|
||||
|
@ -98,7 +98,7 @@ public:
|
||||
Standard_EXPORT TCollection_ExtendedString(const TCollection_ExtendedString& astring);
|
||||
|
||||
//! Move constructor
|
||||
TCollection_ExtendedString (TCollection_ExtendedString&& theOther)
|
||||
TCollection_ExtendedString (TCollection_ExtendedString&& theOther) noexcept
|
||||
: mystring (theOther.mystring),
|
||||
mylength (theOther.mylength)
|
||||
{
|
||||
@ -153,7 +153,7 @@ void operator = (const TCollection_ExtendedString& fromwhere)
|
||||
Standard_EXPORT void Swap (TCollection_ExtendedString& theOther);
|
||||
|
||||
//! Move assignment operator
|
||||
TCollection_ExtendedString& operator= (TCollection_ExtendedString&& theOther) { Swap (theOther); return *this; }
|
||||
TCollection_ExtendedString& operator= (TCollection_ExtendedString&& theOther) noexcept { Swap (theOther); return *this; }
|
||||
|
||||
//! Frees memory allocated by ExtendedString.
|
||||
Standard_EXPORT ~TCollection_ExtendedString();
|
||||
|
@ -70,13 +70,13 @@ public:
|
||||
}
|
||||
|
||||
//! Move constructor
|
||||
TopLoc_SListOfItemLocation (TopLoc_SListOfItemLocation&& theOther)
|
||||
TopLoc_SListOfItemLocation (TopLoc_SListOfItemLocation&& theOther) noexcept
|
||||
: myNode(std::move (theOther.myNode))
|
||||
{
|
||||
}
|
||||
|
||||
//! Move operator
|
||||
TopLoc_SListOfItemLocation& operator= (TopLoc_SListOfItemLocation&& theOther)
|
||||
TopLoc_SListOfItemLocation& operator= (TopLoc_SListOfItemLocation&& theOther) noexcept
|
||||
{
|
||||
myNode = std::move (theOther.myNode);
|
||||
return *this;
|
||||
|
Loading…
x
Reference in New Issue
Block a user