Salome HOME
Issue #1787 : code's adjusting
[modules/shaper.git] / src / PartSet / PartSet_OverconstraintListener.cpp
index 52d84913e823221a05a3b20edcace7f9c4041780..0d8417d63b04a4bdb38308613e949b1fd7f2ebbe 100755 (executable)
@@ -63,9 +63,11 @@ void PartSet_OverconstraintListener::processEvent(
 
   QString aCurrentInfoStr = getObjectsInfo(myConflictingObjects);
 
-  qDebug(QString("PartSet_OverconstraintListener::processEvent: %1,\nobjects count = %2:%3\ncurrent objects count = %4:%5")
-                .arg(isRepaired ? "REPAIRED" : "FAILED")
-                .arg(aCount).arg(anInfoStr).arg(myConflictingObjects.size()).arg(aCurrentInfoStr).toStdString().c_str());
+  QString aMsg("PartSet_OverconstraintListener::processEvent: %1,\nobjects "
+               "count = %2:%3\ncurrent objects count = %4:%5");
+  qDebug(aMsg.arg(isRepaired ? "REPAIRED" : "FAILED")
+             .arg(aCount).arg(anInfoStr).arg(myConflictingObjects.size())
+             .arg(aCurrentInfoStr).toStdString().c_str());
 #endif
 
   if (theMessage->eventID() == Events_Loop::eventByName(EVENT_SOLVER_FAILED)) {
@@ -102,14 +104,15 @@ void PartSet_OverconstraintListener::processEvent(
 }
 
 bool PartSet_OverconstraintListener::appendConflictingObjects(
-                                                  const std::set<ObjectPtr>& theConflictingObjects)
+                                               const std::set<ObjectPtr>& theConflictingObjects)
 {
   std::set<ObjectPtr> aModifiedObjects;
   std::vector<int> aColor;
   getConflictingColor(aColor);
 
   // set error state for new objects and append them in the internal map of objects
-  std::set<ObjectPtr>::const_iterator anIt = theConflictingObjects.begin(), aLast = theConflictingObjects.end();
+  std::set<ObjectPtr>::const_iterator
+    anIt = theConflictingObjects.begin(), aLast = theConflictingObjects.end();
   for (; anIt != aLast; anIt++) {
     ObjectPtr anObject = *anIt;
     if (myConflictingObjects.find(anObject) == myConflictingObjects.end()) { // it is not found
@@ -125,12 +128,13 @@ bool PartSet_OverconstraintListener::appendConflictingObjects(
 }
 
 bool PartSet_OverconstraintListener::repairConflictingObjects(
-                                                  const std::set<ObjectPtr>& theConflictingObjects)
+                                              const std::set<ObjectPtr>& theConflictingObjects)
 {
   std::set<ObjectPtr> aModifiedObjects;
   // erase error state of absent current objects in the parameter list
   std::set<ObjectPtr>::const_iterator anIt, aLast;
-  for (anIt = theConflictingObjects.begin(), aLast = theConflictingObjects.end() ; anIt != aLast; anIt++) {
+  for (anIt = theConflictingObjects.begin(), aLast = theConflictingObjects.end();
+       anIt != aLast; anIt++) {
     ObjectPtr anObject = *anIt;
     if (theConflictingObjects.find(anObject) != theConflictingObjects.end()) { // it is found
       myConflictingObjects.erase(anObject);
@@ -166,6 +170,7 @@ XGUI_Workshop* PartSet_OverconstraintListener::workshop() const
   return aConnector->workshop();
 }
 
+#ifdef _DEBUG
 QString PartSet_OverconstraintListener::getObjectsInfo(const std::set<ObjectPtr>& theObjects)
 {
   std::set<ObjectPtr>::const_iterator anIt = theObjects.begin(),
@@ -176,3 +181,4 @@ QString PartSet_OverconstraintListener::getObjectsInfo(const std::set<ObjectPtr>
 
   return anInfo.join(";\n");
 }
+#endif