]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix compilation of ModelHighAPI on CentOS
authorazv <azv@opencascade.com>
Thu, 18 Aug 2016 12:44:12 +0000 (15:44 +0300)
committerazv <azv@opencascade.com>
Thu, 18 Aug 2016 12:44:12 +0000 (15:44 +0300)
src/ModelHighAPI/ModelHighAPI_Dumper.cpp

index 28961598fd5ecfc827f2fb82c77e7624d4616aca..5369fe882b2230db299746e8de384faf7af04e46 100644 (file)
@@ -59,20 +59,15 @@ ModelHighAPI_Dumper* ModelHighAPI_Dumper::getInstance()
   return mySelf;
 }
 
-#define CLEAR_STREAM(theStream) { \
-    std::ostringstream anOther;   \
-    swap(theStream, anOther);     \
-  }
-
 void ModelHighAPI_Dumper::clear(bool bufferOnly)
 {
-  CLEAR_STREAM(myDumpBuffer);
+  myDumpBuffer.str("");
   myDumpBuffer << std::setprecision(16);
 
   clearNotDumped();
 
   if (!bufferOnly) {
-    CLEAR_STREAM(myFullDump);
+    myFullDump.str("");
     myFullDump << std::setprecision(16);
 
     myNames.clear();
@@ -545,11 +540,11 @@ ModelHighAPI_Dumper& ModelHighAPI_Dumper::operator<<(
     myDumpBuffer << "]";
   } else {
     // clear buffer and store list "as is"
-    CLEAR_STREAM(myDumpBuffer);
+    myDumpBuffer.str("");
     *this << theRefList;
     // save buffer and clear it again
     std::string aDumpedList = myDumpBuffer.str();
-    CLEAR_STREAM(myDumpBuffer);
+    myDumpBuffer.str("");
     // obtain name of list
     FeaturePtr anOwner = ModelAPI_Feature::feature(theRefList->owner());
     std::string aListName = name(anOwner) + "_objects";