Sprintf with %s always convert values into char*, not safety from int.
Move operators and constructors can be marked as noexcept
return 0;
}
//
- char buf[64];
Standard_Boolean bRunParallel;
Standard_Integer aNb;
BOPAlgo_BOP aBOP;
const TopTools_ListOfShape& aLC=pPF->Arguments();
aNb=aLC.Extent();
if (aNb!=2) {
- Sprintf (buf, " wrong number of arguments %s\n", aNb);
- di << buf;
+ di << " wrong number of arguments " << aNb << '\n';
return 0;
}
//
return 0;
}
//
- char buf[64];
Standard_Boolean bRunParallel;
Standard_Integer aNb;
BOPAlgo_Section aBOP;
const TopTools_ListOfShape& aLC=pPF->Arguments();
aNb=aLC.Extent();
if (aNb!=2) {
- Sprintf (buf, " wrong number of arguments %s\n", aNb);
- di << buf;
+ di << " wrong number of arguments " << aNb << '\n';
return 0;
}
//
}
//! Assignment operator
- NCollection_DynamicArray& operator= (NCollection_DynamicArray&& theOther)
+ NCollection_DynamicArray& operator= (NCollection_DynamicArray&& theOther) noexcept
{
return Assign(std::forward<NCollection_DynamicArray>(theOther));
}
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
// 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)