Fix dynamic MPMCQueue tryObtainPromisedPushTicket() to prevent tryWriteUntil() and...
[folly.git] / folly / dynamic.cpp
index 5e656c5e2d2acb0ce461942e9a88cbeefe295335..47fba09b1ce1c61ffb12b3ef64336e4922f333b7 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * limitations under the License.
  */
 
-#include <folly/Hash.h>
 #include <folly/dynamic.h>
+
+#include <folly/Assume.h>
+#include <folly/Hash.h>
 #include <folly/portability/BitsFunctexcept.h>
 
 namespace folly {
@@ -277,9 +279,8 @@ std::size_t dynamic::hash() const {
     const auto& str = getString();
     return ::folly::hash::fnv32_buf(str.data(), str.size());
   }
-  default:
-    CHECK(0); abort();
   }
+  assume_unreachable();
 }
 
 char const* dynamic::typeName(Type t) {