Mark two implicit ctors as explicit
authorYedidya Feldblum <yfeldblum@fb.com>
Sun, 30 Jul 2017 00:54:14 +0000 (17:54 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Sun, 30 Jul 2017 01:08:19 +0000 (18:08 -0700)
Summary:
[Folly] Mark two implicit ctors as `explicit`.

They did not need to be implicit.

Reviewed By: andrewjcg

Differential Revision: D5524798

fbshipit-source-id: a50bc6bfc9da2642891faf0aa38a19f46e75b9da

folly/io/IOBuf.cpp
folly/test/DeterministicScheduleTest.cpp

index 91f7d8ded409c2f3aa3047c7bb35ee9c6e2d4a62..80741e3e38884b3c611d3adfc38666a6297b36be 100644 (file)
@@ -84,9 +84,7 @@ void takeOwnershipError(bool freeOnError, void* buf,
 namespace folly {
 
 struct IOBuf::HeapPrefix {
-  HeapPrefix(uint16_t flg)
-    : magic(kHeapMagic),
-      flags(flg) {}
+  explicit HeapPrefix(uint16_t flg) : magic(kHeapMagic), flags(flg) {}
   ~HeapPrefix() {
     // Reset magic to 0 on destruction.  This is solely for debugging purposes
     // to help catch bugs where someone tries to use HeapStorage after it has
index 331e42e3e9ea77f5c56b8d9b00a6fbefdbb86893..f494ad37618ca76fae9b139c9a2066ee49577ee2 100644 (file)
@@ -316,7 +316,7 @@ struct AnnotatedAtomicCounter : public Base<T> {
   }
 
   /* Constructor -- calls original constructor */
-  AnnotatedAtomicCounter(int val) : Base<T>(val) {}
+  explicit AnnotatedAtomicCounter(int val) : Base<T>(val) {}
 
   /* Overloads of original member functions (as needed) */