1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-19 13:40:49 +03:00

0030683: Coding Rules - eliminate CLang compiler warnings -Wreturn-std-move

Added generalized move constructor and assignment operator to initialize TopoDS_Shape by object of this or derived type.
Added move constructor and assignment operator for TopLoc_SListOfItemLocation.
Macro OCCT_NO_RVALUE_REFERENCE is used in Standard_Handle.hxx instead of direct check of compiler version.
This commit is contained in:
kgv
2019-04-29 19:51:34 +03:00
committed by bugmaster
parent 858435884d
commit 77bc2ad1e0
5 changed files with 88 additions and 142 deletions

View File

@@ -70,8 +70,7 @@ namespace opencascade {
BeginScope();
}
#if(defined(_MSC_VER) && (_MSC_VER < 1600))
#else
#ifndef OCCT_NO_RVALUE_REFERENCE
//! Move constructor
handle (handle&& theHandle) : entity(theHandle.entity)
{
@@ -114,8 +113,7 @@ namespace opencascade {
return *this;
}
#if(defined(_MSC_VER) && (_MSC_VER < 1600))
#else
#ifndef OCCT_NO_RVALUE_REFERENCE
//! Move operator
handle& operator= (handle&& theHandle)
{
@@ -309,8 +307,7 @@ namespace opencascade {
BeginScope();
}
#if(defined(_MSC_VER) && (_MSC_VER < 1600))
#else
#ifndef OCCT_NO_RVALUE_REFERENCE
//! Generalized move constructor
template <class T2>
handle (handle<T2>&& theHandle, typename std::enable_if <is_base_but_not_same <T, T2>::value>::type* = nullptr)
@@ -330,8 +327,7 @@ namespace opencascade {
return *this;
}
#if(defined(_MSC_VER) && (_MSC_VER < 1600))
#else
#ifndef OCCT_NO_RVALUE_REFERENCE
//! Generalized move operator
template <class T2>
handle& operator= (handle<T2>&& theHandle)