diff base/XmlExportable.cpp @ 1683:e4f31f506116 single-point

Start ids at 0 - backward-compatibility makes testing easier
author Chris Cannam
date Wed, 03 Apr 2019 16:03:39 +0100
parents f97d64b8674f
children
line wrap: on
line diff
--- a/base/XmlExportable.cpp	Wed Apr 03 16:03:18 2019 +0100
+++ b/base/XmlExportable.cpp	Wed Apr 03 16:03:39 2019 +0100
@@ -72,10 +72,11 @@
 {
     if (m_exportId == -1) {
         static QMutex mutex;
-        static int lastId = 0;
+        static int nextId = 0;
         QMutexLocker locker(&mutex);
         if (m_exportId == -1) {
-            m_exportId = ++lastId;
+            m_exportId = nextId;
+            ++nextId;
         }
     }
     return m_exportId;