Refactor FOLLY_GCC_DISABLE_WARNING to play nice with clang-format
[folly.git] / folly / SingletonThreadLocal.h
index e073fecd2d2f303817fa82daaaec60c945bd5cc4..943883b6f5931bfabff544fcb555534e7a6cfb39 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.
@@ -38,7 +38,6 @@ class SingletonThreadLocal {
 
   static T& get() {
 #ifdef FOLLY_TLS
-    *localPtr() = nullptr;
     if (UNLIKELY(*localPtr() == nullptr)) {
       *localPtr() = &(**SingletonT::get());
     }