Salome HOME
updated copyright message
[modules/kernel.git] / src / SALOMEDSImpl / SALOMEDSImpl_SComponent.cxx
index 84e74c4f715a4b693d9d4420197ef2c910e1e8c7..2fda755b1a6b2bf61efc466c6266dd6baaa06677 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2023  CEA, EDF, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -43,6 +43,7 @@ SALOMEDSImpl_SComponent::SALOMEDSImpl_SComponent()
  */
 //============================================================================
 SALOMEDSImpl_SComponent::SALOMEDSImpl_SComponent(const SALOMEDSImpl_SComponent& theSCO)
+: SALOMEDSImpl_SObject()
 {
   _lab   = theSCO._lab;
   _value = theSCO._value;
@@ -110,10 +111,7 @@ bool SALOMEDSImpl_SComponent::ComponentIOR(std::string& IOR)
 bool SALOMEDSImpl_SComponent::IsA(const DF_Label& theLabel)
 {
   // scomponent must contain comment and belong to the 2th depth label
-  if ( theLabel.IsAttribute(SALOMEDSImpl_AttributeComment::GetID()) && theLabel.Depth() == 2) {
-    return true;
-  }
-  return false;
+  return theLabel.Depth() == 2 && theLabel.IsAttribute(SALOMEDSImpl_AttributeComment::GetID());
 }
 
 //============================================================================