Skip to content

v0.2.54..v0.2.55 changeset NamedOp.cpp

Garret Voltz edited this page Aug 14, 2020 · 1 revision
diff --git a/hoot-core/src/main/cpp/hoot/core/ops/NamedOp.cpp b/hoot-core/src/main/cpp/hoot/core/ops/NamedOp.cpp
index 710b6dc..b0595c3 100644
--- a/hoot-core/src/main/cpp/hoot/core/ops/NamedOp.cpp
+++ b/hoot-core/src/main/cpp/hoot/core/ops/NamedOp.cpp
@@ -38,6 +38,7 @@
 #include <hoot/core/util/StringUtils.h>
 #include <hoot/core/elements/OsmMapConsumer.h>
 #include <hoot/core/util/MapProjector.h>
+#include <hoot/core/util/MemoryUsageChecker.h>
 
 // Qt
 #include <QElapsedTimer>
@@ -151,6 +152,8 @@ void NamedOp::apply(OsmMapPtr& map)
       throw HootException("Unexpected operation: " + s);
     }
 
+    MemoryUsageChecker::getInstance().check();
+
     LOG_DEBUG(
       "\tElement count after operation " << s << ": " <<
       StringUtils::formatLargeNumber(map->getElementCount()));
@@ -172,8 +175,8 @@ void NamedOp::_updateProgress(const int currentStep, const QString& message)
 {
   // Always check for a valid task weight and that the job was set to running. Otherwise, this is
   // just an empty progress object, and we shouldn't log progress.
-  LOG_VARD(_progress.getTaskWeight());
-  LOG_VARD(_progress.getState());
+  LOG_VART(_progress.getTaskWeight());
+  LOG_VART(_progress.getState());
   if (_progress.getTaskWeight() != 0.0 && _progress.getState() == Progress::JobState::Running)
   {
     _progress.setFromRelative(
@@ -193,7 +196,7 @@ QString NamedOp::_getInitMessage(const QString& message,
   {
     initMessage += message + "...";
   }
-  LOG_VARD(initMessage);
+  LOG_VART(initMessage);
   return initMessage;
 }
 
Clone this wiki locally