diff --git a/src/commons/Debug.h b/src/commons/Debug.h index 8b7c79b1..9c0ad646 100644 --- a/src/commons/Debug.h +++ b/src/commons/Debug.h @@ -178,8 +178,13 @@ class Debug prevPrintedId = 0; } - void updateProgress(){ - size_t id = __sync_fetch_and_add(¤tPos, 1); + void updateProgress(size_t pos = SIZE_MAX){ + size_t id; + if (pos == SIZE_MAX) { + id = __sync_fetch_and_add(¤tPos, 1); + } else { + id = pos; + } // if no active terminal exists write dots if(interactive == false){ if(totalEntries==SIZE_MAX) {