Fix compile error in SimpleRelaxed using C++11 atomics
authorJeff Preshing <filter-github@preshing.com>
Tue, 16 Feb 2016 21:19:41 +0000 (16:19 -0500)
committerJeff Preshing <filter-github@preshing.com>
Tue, 16 Feb 2016 21:19:41 +0000 (16:19 -0500)
junction/ConcurrentMap_SimpleRelaxed.h

index d0f9a1a904f2b02c5cac1db3bdf58f691c98b09a..269db9a880e33af6c65fd1455ff68d17c39d48f4 100644 (file)
@@ -97,8 +97,8 @@ public:
         // Must be called when there are no concurrent readers or writers
         for (ureg idx = 0; idx <= m_sizeMask; idx++) {
             Cell* cell = m_cells + idx;
         // Must be called when there are no concurrent readers or writers
         for (ureg idx = 0; idx <= m_sizeMask; idx++) {
             Cell* cell = m_cells + idx;
-            cell->key = KeyTraits::NullKey;
-            cell->value = Value(ValueTraits::NullValue);
+            cell->key.storeNonatomic(KeyTraits::NullKey);
+            cell->value.storeNonatomic(Value(ValueTraits::NullValue));
         }
     }
 };
         }
     }
 };