Don't attempt to implicitly convert an atomic<T> to bool
authorChristopher Dykes <cdykes@fb.com>
Wed, 4 May 2016 17:26:43 +0000 (10:26 -0700)
committerFacebook Github Bot 0 <facebook-github-bot-0-bot@fb.com>
Wed, 4 May 2016 17:35:42 +0000 (10:35 -0700)
Summary: MSVC doesn't like it, so the other uses were changed to .load() explicitly a while back, but this use has been added since then.

Reviewed By: yfeldblum

Differential Revision: D3255261

fb-gh-sync-id: 11d49902eb3ef7113a7c57cc760353554a487496
fbshipit-source-id: 11d49902eb3ef7113a7c57cc760353554a487496

folly/AtomicIntrusiveLinkedList.h

index a78b685f69897af1950d869df53c04b7b5f24fa8..e74554220123a1bf7dc93a6edffdefdfe2e66a43 100644 (file)
@@ -68,7 +68,7 @@ class AtomicIntrusiveLinkedList {
   }
 
   bool empty() const {
-    return head_ == nullptr;
+    return head_.load() == nullptr;
   }
 
   /**