mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-05 18:16:23 +03:00
0025077: [OOP] Explicit initialization of copy constructor
Explicit calls of copy constructor of base class added where compiler warnings are reported Minor correction
This commit is contained in:
parent
d804b26d77
commit
a9b30f0acb
@ -46,23 +46,11 @@ static
|
||||
//function :
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
inline BOPDS_PassKey::BOPDS_PassKey(const BOPDS_PassKey& aOther)
|
||||
inline BOPDS_PassKey::BOPDS_PassKey(const BOPDS_PassKey& theOther)
|
||||
:
|
||||
myPtr(0)
|
||||
{
|
||||
Standard_Integer i;
|
||||
//
|
||||
myPtr=NULL;
|
||||
Clear();
|
||||
//
|
||||
myAllocator=aOther.myAllocator;
|
||||
myNbIds=aOther.myNbIds;
|
||||
mySum=aOther.mySum;
|
||||
//
|
||||
if (myNbIds) {
|
||||
myPtr=Allocate(myNbIds);
|
||||
for (i=0; i<myNbIds; ++i) {
|
||||
myPtr[i]=aOther.myPtr[i];
|
||||
}
|
||||
}
|
||||
(*this) = theOther;
|
||||
}
|
||||
//=======================================================================
|
||||
//function :operator =
|
||||
@ -70,8 +58,6 @@ static
|
||||
//=======================================================================
|
||||
inline BOPDS_PassKey& BOPDS_PassKey::operator =(const BOPDS_PassKey& aOther)
|
||||
{
|
||||
Standard_Integer i;
|
||||
//
|
||||
Clear();
|
||||
//
|
||||
myAllocator=aOther.myAllocator;
|
||||
@ -80,7 +66,7 @@ static
|
||||
//
|
||||
if (myNbIds) {
|
||||
myPtr=Allocate(myNbIds);
|
||||
for (i=0; i<myNbIds; ++i) {
|
||||
for (int i=0; i<myNbIds; ++i) {
|
||||
myPtr[i]=aOther.myPtr[i];
|
||||
}
|
||||
}
|
||||
|
@ -40,11 +40,11 @@
|
||||
//function :
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
inline BOPDS_PassKeyBoolean::BOPDS_PassKeyBoolean(const BOPDS_PassKeyBoolean& aOther)
|
||||
inline BOPDS_PassKeyBoolean::BOPDS_PassKeyBoolean(const BOPDS_PassKeyBoolean& theOther)
|
||||
:
|
||||
BOPDS_PassKey(theOther)
|
||||
{
|
||||
myPtr=NULL;
|
||||
BOPDS_PassKey::operator =(aOther);
|
||||
myFlag=aOther.myFlag;
|
||||
myFlag = theOther.myFlag;
|
||||
}
|
||||
//=======================================================================
|
||||
//function :~
|
||||
|
@ -69,7 +69,8 @@ Graphic3d_ClipPlane::Graphic3d_ClipPlane(const Equation& theEquation)
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
Graphic3d_ClipPlane::Graphic3d_ClipPlane(const Graphic3d_ClipPlane& theOther)
|
||||
: myEquation (theOther.myEquation),
|
||||
: Standard_Transient(theOther),
|
||||
myEquation (theOther.myEquation),
|
||||
myIsOn (theOther.myIsOn),
|
||||
myIsCapping (theOther.myIsCapping),
|
||||
myMaterial (theOther.myMaterial),
|
||||
|
@ -78,9 +78,10 @@ Standard_Failure::Standard_Failure (const Standard_CString AString)
|
||||
myMessage = allocate_message(AString);
|
||||
}
|
||||
|
||||
Standard_Failure::Standard_Failure (const Standard_Failure& aFailure)
|
||||
Standard_Failure::Standard_Failure (const Standard_Failure& theFailure)
|
||||
: Standard_Transient(theFailure)
|
||||
{
|
||||
myMessage = copy_message(aFailure.myMessage);
|
||||
myMessage = copy_message(theFailure.myMessage);
|
||||
}
|
||||
|
||||
void Standard_Failure::Destroy()
|
||||
|
Loading…
x
Reference in New Issue
Block a user