Coding - Resolving C26439 & type formatting warnings

Sprintf  with %s always convert values into char*, not safety from int.
Move operators and constructors can be marked as noexcept
This commit is contained in:
dpasukhi
2024-09-10 17:40:12 +00:00
parent 9c6914c3cc
commit 72b244bc98
4 changed files with 5 additions and 9 deletions
+1 -1
View File
@@ -240,7 +240,7 @@ public: //! @name public methods
}
//! Assignment operator
NCollection_DynamicArray& operator= (NCollection_DynamicArray&& theOther)
NCollection_DynamicArray& operator= (NCollection_DynamicArray&& theOther) noexcept
{
return Assign(std::forward<NCollection_DynamicArray>(theOther));
}
+1 -1
View File
@@ -81,7 +81,7 @@ public:
NCollection_UtfString (const NCollection_UtfString& theCopy);
//! Move constructor
NCollection_UtfString (NCollection_UtfString&& theOther);
NCollection_UtfString (NCollection_UtfString&& theOther) noexcept;
//! Copy constructor from UTF-8 string.
//! @param theCopyUtf8 UTF-8 string to copy
+1 -1
View File
@@ -95,7 +95,7 @@ NCollection_UtfString<Type>::NCollection_UtfString (const NCollection_UtfString&
// purpose :
// =======================================================================
template<typename Type> inline
NCollection_UtfString<Type>::NCollection_UtfString (NCollection_UtfString&& theOther)
NCollection_UtfString<Type>::NCollection_UtfString (NCollection_UtfString&& theOther) noexcept
: myString(theOther.myString),
mySize (theOther.mySize),
myLength(theOther.myLength)