From 568fccca4cc0ebb9d2f1d07f6d59812305fd51e5 Mon Sep 17 00:00:00 2001 From: caremoli Date: Wed, 28 Nov 2007 09:41:40 +0000 Subject: [PATCH] CCAR: merge from development branch BR_Dev_For_4_0 --- salome_adm/unix/config_files/production.m4 | 4 ++-- src/DF/DF_Label.cxx | 6 +++++- src/SALOMEDS/SALOME_DriverPy.py | 4 ++-- src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfInteger.cxx | 2 +- src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfReal.cxx | 4 ++-- src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfString.cxx | 2 +- src/SALOMEDSImpl/SALOMEDSImpl_AttributeTreeNode.cxx | 2 +- src/SALOMEDSImpl/SALOMEDSImpl_AttributeUserID.cxx | 2 +- 8 files changed, 15 insertions(+), 11 deletions(-) diff --git a/salome_adm/unix/config_files/production.m4 b/salome_adm/unix/config_files/production.m4 index 1d2b1b0a5..b43c055a1 100644 --- a/salome_adm/unix/config_files/production.m4 +++ b/salome_adm/unix/config_files/production.m4 @@ -56,8 +56,8 @@ if test "X$enable_production" = "Xyes"; then AC_CXX_OPTION(-Wuninitialized,CXXFLAGS) CXXFLAGS="$CXXFLAGS -O " else - CFLAGS="$CFLAGS -O -g" - CXXFLAGS="$CXXFLAGS -O -g" + CFLAGS="$CFLAGS -g" + CXXFLAGS="$CXXFLAGS -g" fi ]) diff --git a/src/DF/DF_Label.cxx b/src/DF/DF_Label.cxx index 453630a3f..08d8ae9f8 100644 --- a/src/DF/DF_Label.cxx +++ b/src/DF/DF_Label.cxx @@ -145,6 +145,7 @@ bool DF_Label::AddAttribute(DF_Attribute* theAttribute) const if(_node->_attributes.find(theAttribute->ID()) != _node->_attributes.end()) return false; theAttribute->_node = _node; _node->_attributes[theAttribute->ID()] = theAttribute; + theAttribute->AfterAddition(); return true; } @@ -156,6 +157,7 @@ bool DF_Label::ForgetAttribute(const std::string& theID) const if(_node->_attributes.find(theID) == _node->_attributes.end()) return false; DF_Attribute* attr = _node->_attributes[theID]; + attr->BeforeForget(); _node->_attributes.erase(theID); delete attr; @@ -170,8 +172,10 @@ bool DF_Label::ForgetAllAttributes(bool clearChildren) const vector va = GetAttributes(); _node->_attributes.clear(); - for(int i = 0, len = va.size(); iBeforeForget(); delete va[i]; + } if(clearChildren) { DF_ChildIterator CI(*this, true); diff --git a/src/SALOMEDS/SALOME_DriverPy.py b/src/SALOMEDS/SALOME_DriverPy.py index 8346a3979..9e8f5264a 100644 --- a/src/SALOMEDS/SALOME_DriverPy.py +++ b/src/SALOMEDS/SALOME_DriverPy.py @@ -38,7 +38,7 @@ class SALOME_DriverPy_i(SALOMEDS__POA.Driver): return self._ComponentDataType def Save(self, theComponent, theURL, isMultiFile): - return NULL + return "" def SaveASCII(self, theComponent, theURL, isMultiFile): return self.Save(theComponent, theURL, isMultiFile) @@ -56,7 +56,7 @@ class SALOME_DriverPy_i(SALOMEDS__POA.Driver): return 1 def PublishInStudy(self, theStudy, theSObject, theObject, theName): - return NULL + return None def CanCopy(self, theObject): return 0 diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfInteger.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfInteger.cxx index a4bab5781..0539b5e81 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfInteger.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfInteger.cxx @@ -42,7 +42,7 @@ static std::string getTitle(std::string theString) std::string aString(theString); int aPos = aString.find(SEPARATOR); if(aPos < 1) return aString; - if(aPos == 1) return std::string(); + if(aPos == 0) return std::string(); return aString.substr(0, aPos); } diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfReal.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfReal.cxx index 62dd160b1..64c5f03a6 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfReal.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfReal.cxx @@ -43,8 +43,8 @@ static std::string getTitle(std::string theString) { std::string aString(theString); int aPos = aString.find(SEPARATOR); - if(aPos < 1) return aString; - if(aPos == 1) return std::string(); + if(aPos < 0) return aString; + if(aPos == 0) return std::string(); return aString.substr(0, aPos); } diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfString.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfString.cxx index 23ba72c3f..245de358c 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfString.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTableOfString.cxx @@ -45,7 +45,7 @@ static std::string getTitle(std::string theString) std::string aString(theString); int aPos = aString.find(SEPARATOR); if(aPos < 1) return aString; - if(aPos == 1) return std::string(); + if(aPos == 0) return std::string(); return aString.substr(0, aPos); } diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTreeNode.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTreeNode.cxx index dfcad3b58..3880fe7ad 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTreeNode.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeTreeNode.cxx @@ -438,7 +438,7 @@ DF_Attribute* SALOMEDSImpl_AttributeTreeNode::NewEmpty() const string SALOMEDSImpl_AttributeTreeNode::Type() { - char* aNodeName = new char[60]; + char* aNodeName = new char[127]; sprintf(aNodeName, "AttributeTreeNodeGUID%s", ID().c_str()); string ret(aNodeName); delete aNodeName; diff --git a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeUserID.cxx b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeUserID.cxx index b2ba71eca..00c7e4038 100644 --- a/src/SALOMEDSImpl/SALOMEDSImpl_AttributeUserID.cxx +++ b/src/SALOMEDSImpl/SALOMEDSImpl_AttributeUserID.cxx @@ -94,7 +94,7 @@ void SALOMEDSImpl_AttributeUserID::Paste (DF_Attribute* into) string SALOMEDSImpl_AttributeUserID::Type() { - char* aUAttrName = new char[60]; + char* aUAttrName = new char[127]; sprintf(aUAttrName, "AttributeUserID_%s",ID().c_str()); string ret(aUAttrName); -- 2.39.2