Ensure curly-braces around control-flow
[folly.git] / folly / Memory.h
index 121f43dbdd53803a2029d5703d8042946e9b8f6e..c17662774b1aac670f6c4ece4ae216f6f28e1896 100644 (file)
@@ -171,7 +171,9 @@ class SysAlloc {
  public:
   void* allocate(size_t size) {
     void* p = ::malloc(size);
-    if (!p) throw std::bad_alloc();
+    if (!p) {
+      throw std::bad_alloc();
+    }
     return p;
   }
   void deallocate(void* p) {
@@ -340,7 +342,9 @@ class allocator_delete
   }
 
   void operator()(pointer p) const {
-    if (!p) return;
+    if (!p) {
+      return;
+    }
     const_cast<allocator_delete*>(this)->destroy(p);
     const_cast<allocator_delete*>(this)->deallocate(p, 1);
   }