folly: replace old-style header guards with "pragma once"
authorSven Over <over@fb.com>
Fri, 1 Apr 2016 15:31:10 +0000 (08:31 -0700)
committerFacebook Github Bot 4 <facebook-github-bot-4-bot@fb.com>
Fri, 1 Apr 2016 15:35:23 +0000 (08:35 -0700)
Summary:Most header files in folly already used "#pragma once" to
protect against multiple inclusion. This diff removes old-style
ifndef/define/endif header guards and replaces them with
pragma once.

In some cases the defined symbol is tested in other header
files. In those cases the "#define" is kept.

Reviewed By: igorsugak

Differential Revision: D3054492

fb-gh-sync-id: 20aa0b9b926a30dd021e4b8f5440e8888874681c
fbshipit-source-id: 20aa0b9b926a30dd021e4b8f5440e8888874681c

167 files changed:
folly/Arena.h
folly/Assume.h
folly/AtomicBitSet.h
folly/AtomicHashArray.h
folly/AtomicHashMap.h
folly/AtomicLinkedList.h
folly/AtomicStruct.h
folly/AtomicUnorderedMap.h
folly/Baton.h
folly/Benchmark.h
folly/Bits.h
folly/CPortability.h
folly/Checksum.h
folly/ConcurrentSkipList-inl.h
folly/ConcurrentSkipList.h
folly/ContainerTraits.h
folly/Conv.h
folly/CppAttributes.h
folly/CpuId.h
folly/DiscriminatedPtr.h
folly/DynamicConverter.h
folly/EvictingCacheMap.h
folly/Exception.h
folly/ExceptionWrapper.h
folly/FBString.h
folly/FBVector.h
folly/File.h
folly/FileUtil.h
folly/Fingerprint.h
folly/Foreach.h
folly/Format.h
folly/FormatArg.h
folly/FormatTraits.h
folly/GroupVarint.h
folly/Hash.h
folly/IndexedMemPool.h
folly/IntrusiveList.h
folly/Lazy.h
folly/LifoSem.h
folly/Likely.h
folly/Logging.h
folly/Malloc.h
folly/MapUtil.h
folly/Memory.h
folly/MemoryMapping.h
folly/Merge.h
folly/Optional.h
folly/PackedSyncPtr.h
folly/Padded.h
folly/Portability.h
folly/Preprocessor.h
folly/ProducerConsumerQueue.h
folly/RWSpinLock.h
folly/Random.h
folly/Range.h
folly/SafeAssert.h
folly/ScopeGuard.h
folly/SmallLocks.h
folly/SparseByteSet.h
folly/SpookyHashV1.h
folly/SpookyHashV2.h
folly/String-inl.h
folly/String.h
folly/Subprocess.h
folly/Synchronized.h
folly/ThreadCachedArena.h
folly/ThreadCachedInt.h
folly/ThreadLocal.h
folly/TimeoutQueue.h
folly/Traits.h
folly/Unicode.h
folly/Uri.h
folly/Varint.h
folly/VersionCheck.h
folly/detail/AtomicHashUtils.h
folly/detail/BitIteratorDetail.h
folly/detail/BitsDetail.h
folly/detail/CacheLocality.h
folly/detail/ChecksumDetail.h
folly/detail/DiscriminatedPtrDetail.h
folly/detail/ExceptionWrapper.h
folly/detail/FileUtilDetail.h
folly/detail/FingerprintPolynomial.h
folly/detail/FunctionalExcept.h
folly/detail/GroupVarintDetail.h
folly/detail/Malloc.h
folly/detail/MemoryIdler.h
folly/detail/RangeCommon.h
folly/detail/RangeSse42.h
folly/detail/SlowFingerprint.h
folly/detail/Stats.h
folly/detail/ThreadLocalDetail.h
folly/detail/UncaughtExceptionCounter.h
folly/dynamic-inl.h
folly/dynamic.h
folly/experimental/BitVectorCoding.h
folly/experimental/Bits.h
folly/experimental/EliasFanoCoding.h
folly/experimental/EventCount.h
folly/experimental/FunctionScheduler.h
folly/experimental/Instructions.h
folly/experimental/NestedCommandLineApp.h
folly/experimental/ProgramOptions.h
folly/experimental/Select64.h
folly/experimental/StringKeyedCommon.h
folly/experimental/StringKeyedMap.h
folly/experimental/StringKeyedSet.h
folly/experimental/StringKeyedUnorderedMap.h
folly/experimental/StringKeyedUnorderedSet.h
folly/experimental/TestUtil.h
folly/experimental/TupleOps.h
folly/experimental/exception_tracer/ExceptionAbi.h
folly/experimental/exception_tracer/ExceptionTracer.h
folly/experimental/exception_tracer/ExceptionTracerLib.h
folly/experimental/exception_tracer/StackTrace.h
folly/experimental/io/AsyncIO.h
folly/experimental/io/FsUtil.h
folly/experimental/io/HugePages.h
folly/experimental/symbolizer/Dwarf.h
folly/experimental/symbolizer/Elf.h
folly/experimental/symbolizer/ElfCache.h
folly/experimental/symbolizer/LineReader.h
folly/experimental/symbolizer/SignalHandler.h
folly/experimental/symbolizer/StackTrace.h
folly/experimental/symbolizer/Symbolizer.h
folly/experimental/symbolizer/test/SignalHandlerTest.h
folly/experimental/test/CodingTestUtils.h
folly/gen/Base-inl.h
folly/gen/Base.h
folly/gen/Combine-inl.h
folly/gen/Combine.h
folly/gen/Core-inl.h
folly/gen/Core.h
folly/gen/File-inl.h
folly/gen/File.h
folly/gen/Parallel.h
folly/gen/ParallelMap-inl.h
folly/gen/ParallelMap.h
folly/gen/String-inl.h
folly/gen/String.h
folly/gen/test/Bench.h
folly/init/Init.h
folly/io/Compression.h
folly/io/Cursor.h
folly/io/IOBuf.h
folly/io/IOBufQueue.h
folly/io/RecordIO.h
folly/io/TypedIOBuf.h
folly/json.h
folly/portability/Constexpr.h
folly/portability/GFlags.h
folly/portability/SysUio.h
folly/small_vector.h
folly/sorted_vector_types.h
folly/stats/BucketedTimeSeries-defs.h
folly/stats/BucketedTimeSeries.h
folly/stats/Histogram-defs.h
folly/stats/Histogram.h
folly/stats/MultiLevelTimeSeries-defs.h
folly/stats/MultiLevelTimeSeries.h
folly/stats/TimeseriesHistogram-defs.h
folly/stats/TimeseriesHistogram.h
folly/test/SynchronizedTestLib-inl.h
folly/test/SynchronizedTestLib.h
folly/test/TestUtils.h
folly/test/function_benchmark/benchmark_impl.h
folly/test/function_benchmark/test_functions.h

index daea8bc16555a5b1f3de4af96b6f5042ed4cd02d..8b928b039d01febacbcc9596338b13fcbcd466d8 100644 (file)
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_ARENA_H_
+#pragma once
 #define FOLLY_ARENA_H_
 
 #include <cassert>
@@ -243,5 +243,3 @@ struct IsArenaAllocator<SysArena> : std::true_type { };
 }  // namespace folly
 
 #include <folly/Arena-inl.h>
-
-#endif /* FOLLY_ARENA_H_ */
index ca37c1455956ade09e64ce1867a007f46e2333bb..7c50a679f0fa6111273ee259fa1873c3c7ee8b32 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_BASE_ASSUME_H_
-#define FOLLY_BASE_ASSUME_H_
+#pragma once
 
 #include <folly/Portability.h>
 #include <glog/logging.h>
@@ -45,5 +44,3 @@ FOLLY_ALWAYS_INLINE void assume(bool cond) {
 }
 
 }  // namespace folly
-
-#endif
index 3d02d572cc2f52f89bba9278616ea7cd3b6bc475..caa61e5a86e664c1471c713172c4b3a10aeaa1f8 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_ATOMICBITSET_H_
-#define FOLLY_ATOMICBITSET_H_
+#pragma once
 
 #include <array>
 #include <atomic>
@@ -158,5 +157,3 @@ inline bool AtomicBitSet<N>::operator[](size_t idx) const {
 }
 
 }  // namespaces
-
-#endif /* FOLLY_ATOMICBITSET_H_ */
index a66b4902d3287af1e7912b91593d6e36cc397b2b..3269a01e8267774d5cdc42f950eceab049039d14 100644 (file)
@@ -29,7 +29,7 @@
  *  @author Jordan DeLong <delong.j@fb.com>
  */
 
-#ifndef FOLLY_ATOMICHASHARRAY_H_
+#pragma once
 #define FOLLY_ATOMICHASHARRAY_H_
 
 #include <atomic>
@@ -429,5 +429,3 @@ friend class AtomicHashMap<KeyT,
 } // namespace folly
 
 #include <folly/AtomicHashArray-inl.h>
-
-#endif // FOLLY_ATOMICHASHARRAY_H_
index 53c8d8afba84f94b962bd07b06155d536b60a06a..b4a0563e9f15049f8ac9d03110c55428b2de897f 100644 (file)
@@ -79,7 +79,7 @@
  *
  */
 
-#ifndef FOLLY_ATOMICHASHMAP_H_
+#pragma once
 #define FOLLY_ATOMICHASHMAP_H_
 
 #include <boost/iterator/iterator_facade.hpp>
@@ -472,5 +472,3 @@ using QuadraticProbingAtomicHashMap =
 } // namespace folly
 
 #include <folly/AtomicHashMap-inl.h>
-
-#endif // FOLLY_ATOMICHASHMAP_H_
index cf880c585cf319318b766a1ddfbb1452d548b2a7..459036ef6a91f5d0cf1b9e0aa6025f5f6c36e443 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_ATOMIC_LINKED_LIST_H_
-#define FOLLY_ATOMIC_LINKED_LIST_H_
+#pragma once
 
 #include <atomic>
 #include <cassert>
@@ -134,5 +133,3 @@ class AtomicLinkedList {
 };
 
 } // namespace folly
-
-#endif
index d478b90cd33728b937cd058aa5c9fad69f118d1d..0587b964060b16c3c1db3df6aa49c318ad66331e 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_ATOMIC_STRUCT_H_
-#define FOLLY_ATOMIC_STRUCT_H_
+#pragma once
 
 #include <atomic>
 #include <type_traits>
@@ -135,5 +134,3 @@ template <> struct AtomicStructIntPick<8> { typedef uint64_t type; };
 } // namespace detail
 
 } // namespace folly
-
-#endif
index eb361144bb35758e2093613f1a7ab235dbb309b4..68fc585d1f8e2b7c52d7255aa9134114d0585490 100644 (file)
@@ -13,8 +13,8 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-#ifndef FOLLY_ATOMICUNORDEREDMAP_H
-#define FOLLY_ATOMICUNORDEREDMAP_H
+
+#pragma once
 
 #include <atomic>
 #include <functional>
@@ -519,4 +519,3 @@ struct MutableData {
 
 
 }
-#endif
index c14e57f32081210e87b09b5bc3e65f47752ae5e9..c10f7146465d536e32f6ff807dfc0e15b684b50f 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_BATON_H
-#define FOLLY_BATON_H
+#pragma once
 
 #include <stdint.h>
 #include <atomic>
@@ -297,5 +296,3 @@ struct Baton {
 };
 
 } // namespace folly
-
-#endif
index 7ca0b7480f0aff34cdc13138cbcac419079803fc..0a384b40aaef98799b76ebf9b9ef102943cbbde2 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_BENCHMARK_H_
-#define FOLLY_BENCHMARK_H_
+#pragma once
 
 #include <folly/Portability.h>
 #include <folly/Preprocessor.h> // for FB_ANONYMOUS_VARIABLE
@@ -536,5 +535,3 @@ void doNotOptimizeAway(T&& datum) {
   if (auto FB_ANONYMOUS_VARIABLE(BENCHMARK_SUSPEND) =   \
       ::folly::BenchmarkSuspender()) {}                 \
   else
-
-#endif // FOLLY_BENCHMARK_H_
index 61a7407d10ddd26c97d495c1d44451b7259b3953..9d91aefa9bf7854f37226147a5d9ee3e1036fb80 100644 (file)
@@ -52,8 +52,7 @@
  * @author Tudor Bosman (tudorb@fb.com)
  */
 
-#ifndef FOLLY_BITS_H_
-#define FOLLY_BITS_H_
+#pragma once
 
 #if !defined(__clang__) && !(defined(_MSC_VER) && (_MSC_VER < 1900))
 #define FOLLY_INTRINSIC_CONSTEXPR constexpr
@@ -574,5 +573,3 @@ inline void storeUnaligned(void* p, T value) {
 }
 
 }  // namespace folly
-
-#endif /* FOLLY_BITS_H_ */
index 6f35319dfc4fc80ae8e0d2881da7783a89fd732c..febf2a141be07266d06f19e648cbbe83e3e9e639 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef CPORTABILITY_H
-#define CPORTABILITY_H
+#pragma once
 
 /* These definitions are in a separate file so that they
  * may be included from C- as well as C++-based projects. */
@@ -72,5 +71,3 @@
 #else
 # define UBSAN_DISABLE(x)
 #endif // UNDEFINED_SANITIZER
-
-#endif // CPORTABILITY_H
index 1168badf3d2eeb7f14aa9ef2172961381639c861..1202893389fc6dc1547faebd3ec9b4bca5d6e22c 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_CHECKSUM_H_
-#define FOLLY_CHECKSUM_H_
+#pragma once
 
 #include <stdint.h>
 #include <cstddef>
@@ -39,5 +38,3 @@ uint32_t crc32c(const uint8_t* data, size_t nbytes,
     uint32_t startingChecksum = ~0U);
 
 } // folly
-
-#endif /* FOLLY_CHECKSUM_H_ */
index 8fd13b6311937722a35374caaa33153fddf71e4f..e4144bcbfb57dfaa035ace57a2f163ac62f4dbcf 100644 (file)
@@ -16,8 +16,7 @@
 
 // @author: Xin Liu <xliux@fb.com>
 
-#ifndef FOLLY_CONCURRENTSKIPLIST_INL_H_
-#define FOLLY_CONCURRENTSKIPLIST_INL_H_
+#pragma once
 
 #include <algorithm>
 #include <atomic>
@@ -333,5 +332,3 @@ class NodeRecycler<NodeType, NodeAlloc, typename std::enable_if<
 };
 
 }}  // namespaces
-
-#endif  // FOLLY_CONCURRENTSKIPLIST_INL_H_
index 3ebdeb940bb3bc1492a3a6ff1788ccdbf2a50c32..ff84de41804926b20221366bc72b6cf53e3513c6 100644 (file)
@@ -117,8 +117,7 @@ Sample usage:
      }
 */
 
-#ifndef FOLLY_CONCURRENT_SKIP_LIST_H_
-#define FOLLY_CONCURRENT_SKIP_LIST_H_
+#pragma once
 
 #include <algorithm>
 #include <atomic>
@@ -800,5 +799,3 @@ class ConcurrentSkipList<T, Comp, NodeAlloc, MAX_HEIGHT>::Skipper {
 };
 
 } // namespace folly
-
-#endif  // FOLLY_CONCURRENT_SKIP_LIST_H_
index c83f4600cfa5f25590637d1e0d41b599dc7c2ceb..4d6d0814b3c484732dc3a6eca4c43b480a7ca046 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_BASE_CONTAINER_TRAITS_H_
-#define FOLLY_BASE_CONTAINER_TRAITS_H_
+#pragma once
 
 #include <folly/Traits.h>
 
@@ -41,5 +40,3 @@ container_emplace_back_or_push_back(Container& container, Args&&... args) {
 }
 
 }
-
-#endif
index d13ebcb25e36de840cb26ea49b15fbc38079975a..eeeb3847996cb3b76e7f477f39858a30d82c9075 100644 (file)
@@ -21,8 +21,7 @@
  * @author Andrei Alexandrescu (andrei.alexandrescu@fb.com)
  */
 
-#ifndef FOLLY_BASE_CONV_H_
-#define FOLLY_BASE_CONV_H_
+#pragma once
 
 #include <folly/FBString.h>
 #include <folly/Likely.h>
@@ -1287,5 +1286,3 @@ to(const Src & value) {
 #undef FOLLY_RANGE_CHECK_STRINGIZE
 #undef FOLLY_RANGE_CHECK_STRINGIZE2
 #endif
-
-#endif /* FOLLY_BASE_CONV_H_ */
index 27bf267b8421dad08d0c84e4c4af0f665c73d9df..6bd6cfe33817b040c9dff8645c5f42f79bf75fc5 100644 (file)
@@ -20,8 +20,7 @@
  * @author Dominik Gabi
  */
 
-#ifndef FOLLY_BASE_ATTRIBUTES_H_
-#define FOLLY_BASE_ATTRIBUTES_H_
+#pragma once
 
 #ifndef __has_cpp_attribute
 #define FOLLY_HAS_CPP_ATTRIBUTE(x) 0
@@ -76,5 +75,3 @@
 #else
 #define FOLLY_NULLABLE
 #endif
-
-#endif /* FOLLY_BASE_ATTRIBUTES_H_ */
index 096fc8d12080832bb8a2d708599d10dbdeac6e94..fe3d58bb970fac74a1f218fcf11c3142a745cc6e 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_CPUID_H_
-#define FOLLY_CPUID_H_
+#pragma once
 
 #include <cstdint>
 #include <folly/Portability.h>
@@ -196,5 +195,3 @@ class CpuId {
 };
 
 }  // namespace folly
-
-#endif /* FOLLY_CPUID_H_ */
index 2f76a658b22f0feb6782a6fa0e3c565688f9b475..24494eff0124553f92ff414ec50167ae3e72bd21 100644 (file)
@@ -24,8 +24,7 @@
  * @author Tudor Bosman (tudorb@fb.com)
  */
 
-#ifndef FOLLY_DISCRIMINATEDPTR_H_
-#define FOLLY_DISCRIMINATEDPTR_H_
+#pragma once
 
 #include <limits>
 #include <stdexcept>
@@ -217,5 +216,3 @@ class DiscriminatedPtr {
 };
 
 }  // namespace folly
-
-#endif /* FOLLY_DISCRIMINATEDPTR_H_ */
index 48bd7115bf106e699270a8887e608ec51f634b41..591f55a72a9ba0600ad8239ac368e5bfada303b6 100644 (file)
@@ -16,8 +16,7 @@
 
 // @author Nicholas Ormrod <njormrod@fb.com>
 
-#ifndef DYNAMIC_CONVERTER_H
-#define DYNAMIC_CONVERTER_H
+#pragma once
 
 #include <folly/dynamic.h>
 namespace folly {
@@ -354,5 +353,3 @@ dynamic toDynamic(const T& x) {
 }
 
 } // namespace folly
-
-#endif // DYNAMIC_CONVERTER_H
index 580738407c7f5a1ce42b7e530835ee8aaadc5ee3..3059fb5e5e2575924f66aeb90fddd1549f0787ff 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_EVICTINGHASHMAP_H_
-#define FOLLY_EVICTINGHASHMAP_H_
+#pragma once
 
 #include <algorithm>
 #include <exception>
@@ -492,5 +491,3 @@ class EvictingCacheMap : private boost::noncopyable {
 };
 
 } // folly
-
-#endif /* FOLLY_EVICTINGHASHMAP_H_ */
index 30444b2bdaa193f17a0eb6764b20294cb95b45f4..85bbeda47164dba61174a6cecf005b49a99d8bcb 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_EXCEPTION_H_
-#define FOLLY_EXCEPTION_H_
+#pragma once
 
 #include <errno.h>
 
@@ -119,5 +118,3 @@ void throwOnFail(V&& value, Args&&... args) {
   ::folly::throwOnFail<E>((cond), "Check failed: " #cond)
 
 }  // namespace folly
-
-#endif /* FOLLY_EXCEPTION_H_ */
index 39eceda4d1d231c9025a9677a7362161ee11e487..22857a0b9b543259f504e52dc9283b9bf023db52 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_EXCEPTIONWRAPPER_H
-#define FOLLY_EXCEPTIONWRAPPER_H
+#pragma once
 
 #include <cassert>
 #include <exception>
@@ -468,4 +467,3 @@ class try_and_catch<> : public exception_wrapper {
   }
 };
 }
-#endif
index 2f025154422ca7400eb84af76917d439709b2b8a..81f146dddb994c12f053df141c81fb71908593a6 100644 (file)
@@ -17,8 +17,7 @@
 // @author: Andrei Alexandrescu (aalexandre)
 // String type.
 
-#ifndef FOLLY_BASE_FBSTRING_H_
-#define FOLLY_BASE_FBSTRING_H_
+#pragma once
 
 #include <atomic>
 #include <limits>
@@ -2492,5 +2491,3 @@ FOLLY_FBSTRING_HASH
 #undef NDEBUG
 #undef FOLLY_DEFINED_NDEBUG_FOR_FBSTRING
 #endif // FOLLY_DEFINED_NDEBUG_FOR_FBSTRING
-
-#endif // FOLLY_BASE_FBSTRING_H_
index c44defef43c732a317b53575c9f46e5e9b3451af..e1809f3179370ed5455c7ef93d6d1f5b5547a199 100644 (file)
@@ -22,8 +22,7 @@
  * optimizations for use with relocatable types and jemalloc.
  */
 
-#ifndef FOLLY_FBVECTOR_H
-#define FOLLY_FBVECTOR_H
+#pragma once
 
 //=============================================================================
 // headers
@@ -1659,5 +1658,3 @@ void attach(fbvector<T, A>& v, T* data, size_t sz, size_t cap) {
 }
 
 } // namespace folly
-
-#endif // FOLLY_FBVECTOR_H
index 53e58deffe1621e82273977af57fe6006bdc2354..09a3b6bf4e087f9a0f53e6faef8bb2ec70528011 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_FILE_H_
-#define FOLLY_FILE_H_
+#pragma once
 
 #include <fcntl.h>
 #include <sys/stat.h>
@@ -136,5 +135,3 @@ void swap(File& a, File& b);
 
 
 }  // namespace folly
-
-#endif /* FOLLY_FILE_H_ */
index 31d368b0a0ed0401af4ddc661890cbefa07f6ff9..a28b0477971d8eb3319ebd50d0ca0e7e37d5292b 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_FILEUTIL_H_
-#define FOLLY_FILEUTIL_H_
+#pragma once
 
 #include <folly/Conv.h>
 #include <folly/Portability.h>
@@ -193,5 +192,3 @@ bool writeFile(const Container& data, const char* filename,
 }
 
 }  // namespaces
-
-#endif /* FOLLY_FILEUTIL_H_ */
index c4f6978d89d33d5face3be4bbf95e7bd2204eade..f1980ae215aa2b35afe248ad0e60b762fcad7b66 100644 (file)
@@ -42,8 +42,7 @@
  * @author Tudor Bosman (tudorb@facebook.com)
  */
 
-#ifndef FOLLY_FINGERPRINT_H_
-#define FOLLY_FINGERPRINT_H_
+#pragma once
 
 #include <cstdint>
 
@@ -261,5 +260,3 @@ inline uint64_t Fingerprint<128>::shlor64(uint64_t v) {
 }
 
 }  // namespace folly
-
-#endif /* FOLLY_FINGERPRINT_H_ */
index c6e45835bf471f9ab1bd3958e9d6db15720cc784..d362c0bab2b3378bddb0637c11287c8a007838ca 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_BASE_FOREACH_H_
-#define FOLLY_BASE_FOREACH_H_
+#pragma once
 
 /*
  * Iterim macros (until we have C++0x range-based for) that simplify
@@ -227,5 +226,3 @@ downTo(T& iter, const U& begin) {
  */
 #define FOR_EACH_RANGE_R(i, begin, end) \
   for (auto i = (false ? (begin) : (end)); ::folly::detail::downTo(i, (begin));)
-
-#endif
index 89332a1b50e34cb0e7397b9ae280b56072a59c3e..c34f333978d3bd4f7a06f6c8483f14d881c5e3c5 100644 (file)
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_FORMAT_H_
+#pragma once
 #define FOLLY_FORMAT_H_
 
 #include <cstdio>
@@ -433,5 +433,3 @@ vformatChecked(Str* out, StringPiece fmt, Container&& container) {
 #include <folly/Format-inl.h>
 
 #pragma GCC diagnostic pop
-
-#endif /* FOLLY_FORMAT_H_ */
index 127745c47e16998faea7c5d639cf37c342d0cb8b..6f25299e5217c647825452a1661386f08aa0e8ab 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_FORMATARG_H_
-#define FOLLY_FORMATARG_H_
+#pragma once
 
 #include <stdexcept>
 #include <folly/Conv.h>
@@ -275,5 +274,3 @@ inline int FormatArg::splitIntKey() {
 }
 
 }  // namespace folly
-
-#endif /* FOLLY_FORMATARG_H_ */
index 9ff17bd63907bcdf92020de1e494a5601f2fab8f..54175da495a0bccda76ee173ccf0cace83cf7925 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_FORMAT_TRAITS_H_
-#define FOLLY_FORMAT_TRAITS_H_
+#pragma once
 
 #include <type_traits>
 
@@ -62,5 +61,3 @@ struct IndexableTraitsAssoc : public FormatTraitsBase {
 };
 
 }}  // namespaces
-
-#endif /* FOLLY_FORMAT_TRAITS_H_ */
index 136a7b17e74c9e05116274b3044ba4211b203553..f91191cea139921e4ae5dd779329d9d0a6aaf621 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_GROUPVARINT_H_
-#define FOLLY_GROUPVARINT_H_
+#pragma once
 
 #if !defined(__GNUC__) && !defined(_MSC_VER)
 #error GroupVarint.h requires GCC or MSVC
@@ -618,4 +617,3 @@ typedef GroupVarintDecoder<uint64_t> GroupVarint64Decoder;
 }  // namespace folly
 
 #endif /* FOLLY_X64 || defined(__i386__) || FOLLY_PPC64 */
-#endif /* FOLLY_GROUPVARINT_H_ */
index 77f01a965cd5f334ff7fa6d91a85e23ac44a7d56..dd61fb768a4fc863da4584936e4996c06026ebd7 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_BASE_HASH_H_
-#define FOLLY_BASE_HASH_H_
+#pragma once
 
 #include <cstdint>
 #include <cstring>
@@ -460,5 +459,3 @@ namespace std {
     }
   };
 } // namespace std
-
-#endif
index f8771f33f01fd18c8619957ff8746e1e7ed08cf3..1007eff9ec803061c07b7fb97020a41174db1589 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_INDEXEDMEMPOOL_H
-#define FOLLY_INDEXEDMEMPOOL_H
+#pragma once
 
 #include <type_traits>
 #include <stdint.h>
@@ -466,4 +465,3 @@ struct IndexedMemPoolRecycler {
 } // namespace folly
 
 # pragma GCC diagnostic pop
-#endif
index 8d48c2aa6f0fbc2ebdc57ebde2c36e880fb3222d..5a670e7236b2e8a38e02b1e77ffd89cf72c4c461 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_INTRUSIVELIST_H_
-#define FOLLY_INTRUSIVELIST_H_
+#pragma once
 
 /*
  * This file contains convenience aliases that make boost::intrusive::list
@@ -117,5 +116,3 @@ using CountedIntrusiveList = boost::intrusive::list<
     boost::intrusive::constant_time_size<true>>;
 
 } // folly
-
-#endif // FOLLY_INTRUSIVELIST_H_
index 0edb2e7752adbe1e5d292767ceae856b0b4aac06..1d1ba72843cac44bb2ede1b1ef52315d1741db5a 100644 (file)
@@ -13,8 +13,8 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-#ifndef FOLLY_LAZY_H_
-#define FOLLY_LAZY_H_
+
+#pragma once
 
 #include <utility>
 #include <type_traits>
@@ -131,5 +131,3 @@ lazy(Func&& fun) {
 //////////////////////////////////////////////////////////////////////
 
 }
-
-#endif
index 32358fcb70e4bd1f6b64221f43de64686dc57fdd..e5a06a929cdebe5d7daf080b93d2555da6187c27 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_LIFOSEM_H
-#define FOLLY_LIFOSEM_H
+#pragma once
 
 #include <string.h>
 #include <stdint.h>
@@ -605,5 +604,3 @@ struct LifoSemImpl : public detail::LifoSemBase<BatonType, Atom> {
 };
 
 } // namespace folly
-
-#endif
index 0888ab7a9891623d3a270c4851bd54d49945923c..9a5aea99abd4ea6c69b25c9d086364527bc0e3db 100644 (file)
@@ -21,8 +21,7 @@
  * @author Tudor Bosman (tudorb@fb.com)
  */
 
-#ifndef FOLLY_BASE_LIKELY_H_
-#define FOLLY_BASE_LIKELY_H_
+#pragma once
 
 #undef LIKELY
 #undef UNLIKELY
@@ -34,5 +33,3 @@
 #define LIKELY(x)   (x)
 #define UNLIKELY(x) (x)
 #endif
-
-#endif /* FOLLY_BASE_LIKELY_H_ */
index f99b50302463898d68841c5c8fde43ef09541741..404ca80e4d83dc093904be927a1f27fbbf31766d 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_LOGGING_H_
-#define FOLLY_LOGGING_H_
+#pragma once
 
 #include <atomic>
 #include <chrono>
@@ -54,5 +53,3 @@
           LOG(severity)
 
 #endif
-
-#endif  // FOLLY_LOGGING_H_
index 87d34ab4317ba1d93e783f6bb915808e915cde60..e7616da53cbafd7cbc5b16e2610ccceadcd2714a 100644 (file)
@@ -17,7 +17,7 @@
 // Functions to provide smarter use of jemalloc, if jemalloc is being used.
 // http://www.canonware.com/download/jemalloc/jemalloc-latest/doc/jemalloc.html
 
-#ifndef FOLLY_MALLOC_H_
+#pragma once
 #define FOLLY_MALLOC_H_
 
 /**
@@ -279,5 +279,3 @@ _GLIBCXX_END_NAMESPACE_VERSION
 } // folly
 
 #endif // !defined(_GLIBCXX_USE_FB) || defined(_LIBSTDCXX_FBSTRING)
-
-#endif // FOLLY_MALLOC_H_
index d1094f51898826a0e81fa7cda9c7d7a05aabebf0..0df5d788868bd6d7cd34fcd3da059e11e96a6cf7 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_MAPUTIL_H_
-#define FOLLY_MAPUTIL_H_
+#pragma once
 
 #include <folly/Conv.h>
 #include <folly/Optional.h>
@@ -100,5 +99,3 @@ typename Map::mapped_type* get_ptr(
 }
 
 }  // namespace folly
-
-#endif /* FOLLY_MAPUTIL_H_ */
index 69af41d175e5e57cd0502192854c9ebbb3c63f23..193d5062834931688ac4d502abcbf30734209f45 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_MEMORY_H_
-#define FOLLY_MEMORY_H_
+#pragma once
 
 #include <folly/Traits.h>
 #include <folly/portability/Memory.h>
@@ -418,5 +417,3 @@ std::shared_ptr<T> allocate_shared(Allocator&& allocator, Args&&... args) {
 template <class T> struct IsArenaAllocator : std::false_type { };
 
 }  // namespace folly
-
-#endif /* FOLLY_MEMORY_H_ */
index 0b9bce9fd9f0dd02fb675eea32293265be7b2002..bc114d898b90afae10a7aea21e3197a453f60669 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_MEMORYMAPPING_H_
-#define FOLLY_MEMORYMAPPING_H_
+#pragma once
 
 #include <folly/FBString.h>
 #include <folly/File.h>
@@ -250,5 +249,3 @@ void alignedForwardMemcpy(void* dest, const void* src, size_t size);
 void mmapFileCopy(const char* src, const char* dest, mode_t mode = 0666);
 
 }  // namespace folly
-
-#endif /* FOLLY_MEMORYMAPPING_H_ */
index 775d989b23812b30a320b5df2ab79a03204c40d6..51af2f825dba339e9fd3da77c1c01a570b4f1813 100644 (file)
@@ -36,8 +36,7 @@
  * from a.
  */
 
-#ifndef FOLLY_MERGE_H_
-#define FOLLY_MERGE_H_
+#pragma once
 
 #include <algorithm>
 
@@ -82,5 +81,3 @@ OutputIt merge(InputIt1 first1, InputIt1 last1,
 }
 
 }
-
-#endif
index 2e04e332d0f55f6d15f8710764af0baf4385f9c1..6fc07b98f47e204f2f5501cca717087b7c5608a1 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_OPTIONAL_H_
-#define FOLLY_OPTIONAL_H_
+#pragma once
 
 /*
  * Optional - For conditional initialization of values, like boost::optional,
@@ -406,5 +405,3 @@ template<class V> bool operator> (const V& other, const Optional<V>&) = delete;
 ///////////////////////////////////////////////////////////////////////////////
 
 } // namespace folly
-
-#endif // FOLLY_OPTIONAL_H_
index fd7424c506698224fe816fdb423c8820c2bf8da1..74c5ab8f63daf26349a88303b8828f34ed9f9436 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_PACKEDSYNCPTR_H_
-#define FOLLY_PACKEDSYNCPTR_H_
+#pragma once
 
 #include <folly/Portability.h>
 
@@ -147,5 +146,3 @@ static_assert(sizeof(PackedSyncPtr<void>) == 8,
               "messed up");
 
 }
-
-#endif
index 94fc1103b43026e5b8ec256ff2f714c209d5f492..d474b850da5e73be0185f767d0c735b1cb337479 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_PADDED_H_
-#define FOLLY_PADDED_H_
+#pragma once
 
 #include <algorithm>
 #include <cassert>
@@ -512,5 +511,3 @@ class Adaptor {
 
 }  // namespace padded
 }  // namespace folly
-
-#endif /* FOLLY_PADDED_H_ */
index 7de1d8debaccf25e81cd074605cab513c776c7fa..c9616ea7caa23dcaa304007be149877249218b88 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_PORTABILITY_H_
-#define FOLLY_PORTABILITY_H_
+#pragma once
 
 #include <string.h>
 
@@ -365,5 +364,3 @@ using namespace FOLLY_GFLAGS_NAMESPACE;
 // we will take the next one.
 #define FOLLY_STATIC_CTOR_PRIORITY_MAX __attribute__((__init_priority__(102)))
 #endif
-
-#endif // FOLLY_PORTABILITY_H_
index 49bbc7109466f7307ebe46f084af2842d6b6b900..9d098c3de4af43cbc64497dd0bc176f9be092508 100644 (file)
@@ -16,8 +16,7 @@
 
 // @author: Andrei Alexandrescu
 
-#ifndef FOLLY_PREPROCESSOR_
-#define FOLLY_PREPROCESSOR_
+#pragma once
 
 /**
  * Necessarily evil preprocessor-related amenities.
@@ -92,5 +91,3 @@
  * another macro expansion.
  */
 #define FB_STRINGIZE(x) #x
-
-#endif // FOLLY_PREPROCESSOR_
index 69f3fd5a79019f7daeae66b6806a7df404708934..da9b93a4d57efd461185ece5ca7ea75d22e1519a 100644 (file)
@@ -17,8 +17,7 @@
 // @author Bo Hu (bhu@fb.com)
 // @author Jordan DeLong (delong.j@fb.com)
 
-#ifndef PRODUCER_CONSUMER_QUEUE_H_
-#define PRODUCER_CONSUMER_QUEUE_H_
+#pragma once
 
 #include <atomic>
 #include <cassert>
@@ -174,5 +173,3 @@ private:
 };
 
 }
-
-#endif
index a5b6053467ab8c6f8e686c04f1ca0312fbae62e8..5bbdca6f4e5ed5f00efeabc7ef4bc99db8dc90d0 100644 (file)
@@ -81,8 +81,7 @@
  * @author Xin Liu <xliux@fb.com>
  */
 
-#ifndef FOLLY_RWSPINLOCK_H_
-#define FOLLY_RWSPINLOCK_H_
+#pragma once
 
 /*
 ========================================================================
@@ -787,5 +786,3 @@ typedef RWTicketSpinLockT<64> RWTicketSpinLock64;
 #ifdef RW_SPINLOCK_USE_X86_INTRINSIC_
 #undef RW_SPINLOCK_USE_X86_INTRINSIC_
 #endif
-
-#endif  // FOLLY_RWSPINLOCK_H_
index 53283a286a3d01f07d0a3e783562e7e64bcfdc04..0cfc5efe8a991a2b19507e8f7dfa6c7039c63d57 100644 (file)
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_RANDOM_H_
+#pragma once
 #define FOLLY_RANDOM_H_
 
 #include <type_traits>
@@ -245,5 +245,3 @@ inline uint32_t randomNumberSeed() {
 }
 
 #include <folly/Random-inl.h>
-
-#endif
index 4913aef403580330a3609e474ff315791913273e..db2de699df4dffe87000bb1034c6a24a505306b8 100644 (file)
@@ -17,8 +17,7 @@
 // @author Mark Rabkin (mrabkin@fb.com)
 // @author Andrei Alexandrescu (andrei.alexandrescu@fb.com)
 
-#ifndef FOLLY_RANGE_H_
-#define FOLLY_RANGE_H_
+#pragma once
 
 #include <folly/FBString.h>
 #include <folly/Portability.h>
@@ -1147,5 +1146,3 @@ struct hasher<folly::Range<T*>,
 #pragma GCC diagnostic pop
 
 FOLLY_ASSUME_FBVECTOR_COMPATIBLE_1(folly::Range);
-
-#endif // FOLLY_RANGE_H_
index 65d2e9f9df3af809971a4ce15683a647c44f00d7..39d07423dcb97f760c7d0a5a7dd2da8c67e030b6 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_SAFEASSERT_H_
-#define FOLLY_SAFEASSERT_H_
+#pragma once
 
 #include <folly/Portability.h>
 #include <folly/Preprocessor.h>
@@ -50,5 +49,3 @@ namespace folly { namespace detail {
     unsigned int line,
     const char* function);
 }}  // namespace folly
-
-#endif /* FOLLY_SAFEASSERT_H_ */
index 8b16fae1e1deed2d330d8aa12809356530c8155d..0e2ac6d1b621ba11999bcc6de3114747802e6f76 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_SCOPEGUARD_H_
-#define FOLLY_SCOPEGUARD_H_
+#pragma once
 
 #include <cstddef>
 #include <functional>
@@ -276,5 +275,3 @@ operator+(detail::ScopeGuardOnExit, FunctionType&& fn) {
   auto FB_ANONYMOUS_VARIABLE(SCOPE_SUCCESS_STATE) \
   = ::folly::detail::ScopeGuardOnSuccess() + [&]()
 #endif // native uncaught_exception() supported
-
-#endif // FOLLY_SCOPEGUARD_H_
index 88fefe3e966d772d58174f1571769b8d31999c08..fe447563f809fec36187e8f760072a53a5f2a4f8 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_SMALLLOCKS_H_
-#define FOLLY_SMALLLOCKS_H_
+#pragma once
 
 /*
  * This header defines a few very small mutex types.  These are useful
@@ -41,5 +40,3 @@
 #if FOLLY_X64 || FOLLY_A64 || FOLLY_PPC64
 #include <folly/PicoSpinLock.h>
 #endif
-
-#endif
index bed95095481c4e55dfe520764e5950a61c617e45..2dc55e87f47554a884200e800d67a1b8a106f98d 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_FAST_BYTE_SET_H_
-#define FOLLY_FAST_BYTE_SET_H_
+#pragma once
 
 #include <cstdint>
 #include <glog/logging.h>
@@ -86,5 +85,3 @@ class SparseByteSet {
 };
 
 }
-
-#endif
index d6c5553908d6a6a04bed8536ad0c07c6c6670efe..2a3d86706421085380c059de878f57ce83e23ef0 100644 (file)
@@ -42,8 +42,7 @@
 // slower than MD5.
 //
 
-#ifndef FOLLY_SPOOKYHASHV1_H_
-#define FOLLY_SPOOKYHASHV1_H_
+#pragma once
 
 #include <cstddef>
 #include <cstdint>
@@ -302,5 +301,3 @@ private:
 
 }  // namespace hash
 }  // namespace folly
-
-#endif
index 7344ec27ef1ba54f795eea84540b8b2387386240..804191d15fb47d0a4cacd7069d71c7f140ba6e1f 100644 (file)
@@ -43,8 +43,7 @@
 // slower than MD5.
 //
 
-#ifndef FOLLY_SPOOKYHASHV2_H_
-#define FOLLY_SPOOKYHASHV2_H_
+#pragma once
 
 #include <cstddef>
 #include <cstdint>
@@ -307,5 +306,3 @@ private:
 
 }  // namespace hash
 }  // namespace folly
-
-#endif
index 114292d271f99311a3137b704b74ea4acfcbcbfe..e3ad12b4ed8c099672e4baa6fe40c271229932c2 100644 (file)
  * limitations under the License.
  */
 
-#ifndef FOLLY_STRING_INL_H_
-#define FOLLY_STRING_INL_H_
+#pragma once
 
 #include <stdexcept>
 #include <iterator>
 
-#ifndef FOLLY_BASE_STRING_H_
+#ifndef FOLLY_STRING_H_
 #error This file may only be included from String.h
 #endif
 
@@ -669,5 +668,3 @@ void hexDump(const void* ptr, size_t size, OutIt out) {
 }
 
 }  // namespace folly
-
-#endif /* FOLLY_STRING_INL_H_ */
index 19a2c3b23727a93d32a3ab312ca7483740af9e3a..5a5763ca0422c1993a61d9739fedd04bc611228a 100644 (file)
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_BASE_STRING_H_
-#define FOLLY_BASE_STRING_H_
+#pragma once
+#define FOLLY_STRING_H_
 
 #include <exception>
 #include <stdarg.h>
@@ -628,5 +628,3 @@ struct has_nothrow_constructor<folly::basic_fbstring<T> > : true_type {
 } // namespace boost
 
 #include <folly/String-inl.h>
-
-#endif
index 22583e849e0c5f0dfe7804bee053521009d01814..c70a1f4b8ad73b4d3d36bbfa4387026f51fdf580 100644 (file)
@@ -90,8 +90,8 @@
  * make sure to serialize your signals (i.e. kill()) with the waits --
  * either wait & signal from the same thread, or use a mutex.
  */
-#ifndef FOLLY_SUBPROCESS_H_
-#define FOLLY_SUBPROCESS_H_
+
+#pragma once
 
 #include <sys/types.h>
 #include <signal.h>
@@ -869,5 +869,3 @@ inline Subprocess::Options& Subprocess::Options::operator|=(
 }
 
 }  // namespace folly
-
-#endif /* FOLLY_SUBPROCESS_H_ */
index d10a97fc27350ba80daf5d28963aa39c1ff2887b..5ea2ad54247efa5989f59b1cab6273b0eb5aa0f6 100644 (file)
@@ -21,8 +21,7 @@
  * @author: Andrei Alexandrescu (andrei.alexandrescu@fb.com)
  */
 
-#ifndef SYNCHRONIZED_H_
-#define SYNCHRONIZED_H_
+#pragma once
 
 #include <type_traits>
 #include <mutex>
@@ -762,5 +761,3 @@ void lockInOrder(P1& p1, P2& p2) {
             else
 
 } /* namespace folly */
-
-#endif // SYNCHRONIZED_H_
index 50085aec06026e6bad1344e1a317d2a9fff6060e..1fafe3f9dd92dd62282b52696328166899a4dfd6 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_THREADCACHEDARENA_H_
-#define FOLLY_THREADCACHEDARENA_H_
+#pragma once
 
 #include <type_traits>
 
@@ -86,5 +85,3 @@ template <>
 struct IsArenaAllocator<ThreadCachedArena> : std::true_type { };
 
 }  // namespace folly
-
-#endif /* FOLLY_THREADCACHEDARENA_H_ */
index 7e16d6a7b617cfdc4172ccca62f473bf83e5833b..fcc4a7ea0e2f18e256f7c79db215d170a5e2a1de 100644 (file)
@@ -20,8 +20,7 @@
  * @author Spencer Ahrens (sahrens)
  */
 
-#ifndef FOLLY_THREADCACHEDINT_H
-#define FOLLY_THREADCACHEDINT_H
+#pragma once
 
 #include <atomic>
 
@@ -175,5 +174,3 @@ class ThreadCachedInt : boost::noncopyable {
 };
 
 }
-
-#endif
index 30b8042bb337d29aebd111ea4945159b973d8e36..abc9b64af3ac4af2d0a4666035948622599b3aa3 100644 (file)
@@ -34,8 +34,7 @@
  * @author Spencer Ahrens (sahrens)
  */
 
-#ifndef FOLLY_THREADLOCAL_H_
-#define FOLLY_THREADLOCAL_H_
+#pragma once
 
 #include <folly/Portability.h>
 #include <boost/iterator/iterator_facade.hpp>
@@ -353,5 +352,3 @@ class ThreadLocalPtr {
 };
 
 }  // namespace folly
-
-#endif /* FOLLY_THREADLOCAL_H_ */
index bbf556ca35c5ee87389f79d31f418004db884109..cef83a9ba6a2d795d9beef8e10f5585454ceae35 100644 (file)
@@ -25,8 +25,7 @@
  * @author Tudor Bosman (tudorb@fb.com)
  */
 
-#ifndef FOLLY_TIMEOUTQUEUE_H_
-#define FOLLY_TIMEOUTQUEUE_H_
+#pragma once
 
 #include <stdint.h>
 #include <functional>
@@ -127,5 +126,3 @@ class TimeoutQueue {
 };
 
 }  // namespace folly
-
-#endif /* FOLLY_TIMEOUTQUEUE_H_ */
index 2d8c52dd73392da1cd4b0f5d81a058a37e5441e3..f34dc748e6d7998704e71d20720b1c9a84919c11 100644 (file)
@@ -16,8 +16,7 @@
 
 // @author: Andrei Alexandrescu
 
-#ifndef FOLLY_BASE_TRAITS_H_
-#define FOLLY_BASE_TRAITS_H_
+#pragma once
 
 #include <memory>
 #include <limits>
@@ -481,5 +480,3 @@ FOLLY_ASSUME_FBVECTOR_COMPATIBLE_1(boost::shared_ptr);
       classname, func_name, /* nolint */ volatile); \
   FOLLY_CREATE_HAS_MEMBER_FN_TRAITS_IMPL( \
       classname, func_name, /* nolint */ volatile const)
-
-#endif //FOLLY_BASE_TRAITS_H_
index d07cf310786bf5111e1849bad651396fba36227d..ecd0ae10033408761a873d15afb263e69c102979 100644 (file)
@@ -16,8 +16,7 @@
 
 // Some utility routines relating to unicode.
 
-#ifndef FOLLY_UNICODE_H_
-#define FOLLY_UNICODE_H_
+#pragma once
 
 #include <folly/FBString.h>
 
@@ -35,5 +34,3 @@ fbstring codePointToUtf8(char32_t cp);
 //////////////////////////////////////////////////////////////////////
 
 }
-
-#endif
index de693baa79165eae7b994b8665269803216c9e19..fe88523d6afce30737a2849cd35ed5951f091fcb 100644 (file)
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_URI_H_
+#pragma once
 #define FOLLY_URI_H_
 
 #include <folly/String.h>
@@ -119,5 +119,3 @@ class Uri {
 }  // namespace folly
 
 #include <folly/Uri-inl.h>
-
-#endif /* FOLLY_URI_H_ */
index a9b9d0d6b63fb0c8f4744e20bc80dc113c6f8f92..d2e661eb7bf498fcffcedf5d5c1ed07034362926 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_VARINT_H_
-#define FOLLY_VARINT_H_
+#pragma once
 
 #include <type_traits>
 #include <folly/Conv.h>
@@ -138,5 +137,3 @@ inline uint64_t decodeVarint(Range<T*>& data) {
 }
 
 }  // namespaces
-
-#endif /* FOLLY_VARINT_H_ */
index c864e7db8f9ad1bcbbf91055703de71d9090b969..9a3ce67727851ff93a895717acb584be2207f2e6 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_VERSIONCHECK_H_
-#define FOLLY_VERSIONCHECK_H_
+#pragma once
 
 #include <cstdio>
 #include <cstdlib>
     } \
   } \
   }
-
-#endif /* FOLLY_VERSIONCHECK_H_ */
index bb49eef05ec6ca4e63cc09611b8f4704f81a3e80..ba1f49a5af5ddd766388e4d1911e83020ad7d868 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef incl_FOLLY_ATOMIC_HASH_UTILS_H
-#define incl_FOLLY_ATOMIC_HASH_UTILS_H
+#pragma once
 
 #include <thread>
 #include <folly/portability/Asm.h>
@@ -38,5 +37,3 @@ void atomic_hash_spin_wait(Cond condition) {
 }
 
 }} // namespace folly::detail
-
-#endif
index e8a0b38d8e0f5e4d3287ccd28660a8bb9a7ef8ee..6a8b4fe6ddbb72f2b7e7eaeacfe90dc1cc39040e 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_DETAIL_BITITERATORDETAIL_H_
-#define FOLLY_DETAIL_BITITERATORDETAIL_H_
+#pragma once
 
 #include <iterator>
 #include <type_traits>
@@ -88,5 +87,3 @@ struct BitIteratorBase {
 
 }  // namespace bititerator_detail
 }  // namespace folly
-
-#endif /* FOLLY_DETAIL_BITITERATORDETAIL_H_ */
index a411d0a93ebaeacd3d33a303e4c842302c64053b..d89a25ef608601076b161c183cccbe5a4f37369c 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_DETAIL_BITSDETAIL_H_
-#define FOLLY_DETAIL_BITSDETAIL_H_
+#pragma once
 
 namespace folly {
 namespace detail {
@@ -49,5 +48,3 @@ int popcountll(unsigned long long x);
 
 }  // namespace detail
 }  // namespace folly
-
-#endif /* FOLLY_DETAIL_BITSDETAIL_H_ */
index db29b1bd184f25e4959b93c010cfcc4ce5af942d..1ede43cbef70b4f60d4f06f40a77890be419dfa1 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_DETAIL_CACHELOCALITY_H_
-#define FOLLY_DETAIL_CACHELOCALITY_H_
+#pragma once
 
 #include <sched.h>
 #include <algorithm>
@@ -346,5 +345,3 @@ Getcpu::Func AccessSpreader<std::atomic>::pickGetcpuFunc();
 
 } // namespace detail
 } // namespace folly
-
-#endif /* FOLLY_DETAIL_CacheLocality_H_ */
index 9bbe22e9980827e83bb6dbbef3ab8fad512c1377..540b3201f993c5bd2a7513e5639feef94a31212e 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_DETAIL_CHECKSUMDETAIL_H_
-#define FOLLY_DETAIL_CHECKSUMDETAIL_H_
+#pragma once
 
 namespace folly { namespace detail {
 
@@ -54,5 +53,3 @@ uint32_t crc32c_sw(const uint8_t* data, size_t nbytes,
 
 
 }} // folly::detail
-
-#endif /* FOLLY_DETAIL_CHECKSUMDETAIL_H_ */
index 2c14642db0a51a32d107e8fcc6e18fea68759837..8795321ab4eb65645eb7879789a9c917db9d5cef 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_DETAIL_DISCRIMINATEDPTRDETAIL_H_
-#define FOLLY_DETAIL_DISCRIMINATEDPTRDETAIL_H_
+#pragma once
 
 #include <utility>
 #include <type_traits>
@@ -161,5 +160,3 @@ struct ApplyConstVisitor
 
 }  // namespace dptr_detail
 }  // namespace folly
-
-#endif /* FOLLY_DETAIL_DISCRIMINATEDPTRDETAIL_H_ */
index c38b8c75cd5c3df23ac2a9be01ab6260630ba3e5..8d5071a68551991c7923f9acc34ae5376e81957e 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_DETAIL_EXCEPTIONWRAPPER_H
-#define FOLLY_DETAIL_EXCEPTIONWRAPPER_H
+#pragma once
 
 namespace folly { namespace detail {
 
@@ -28,5 +27,3 @@ class Thrower {
 };
 
 }}
-
-#endif
index 11f06ae474e0b4010a84052ea36d8fd746919b9a..b5ae6f65ed0ef3131df477de0735b570af30706e 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_DETAIL_FILEUTILDETAIL_H_
-#define FOLLY_DETAIL_FILEUTILDETAIL_H_
+#pragma once
 
 #include <cerrno>
 #include <unistd.h>
@@ -107,5 +106,3 @@ ssize_t wrapvFull(F f, int fd, iovec* iov, int count, Offset... offset) {
 }
 
 }}  // namespaces
-
-#endif /* FOLLY_DETAIL_FILEUTILDETAIL_H_ */
index f405fd8344904b991d22832ea4aba86e5dc66b70..588ae7574efd5f5b03ea4d56f993d56af8f667fd 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_BUILD_FINGERPRINTPOLYNOMIAL_H_
-#define FOLLY_BUILD_FINGERPRINTPOLYNOMIAL_H_
+#pragma once
 
 #include <cstdint>
 
@@ -141,5 +140,3 @@ class FingerprintPolynomial {
 
 }  // namespace detail
 }  // namespace folly
-
-#endif /* FOLLY_BUILD_FINGERPRINTPOLYNOMIAL_H_ */
index 575da6f3472d9713ddb46074f0d61b595920afcd..643c8eb293e8e75dfd09c1837c26c56efbc976ec 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_DETAIL_FUNCTIONAL_EXCEPT_H
-#define FOLLY_DETAIL_FUNCTIONAL_EXCEPT_H
+#pragma once
 
 #include <folly/Portability.h>
 
@@ -36,5 +35,3 @@ FOLLY_NAMESPACE_STD_END
 #else
 #error This file should never be included if FOLLY_HAVE_BITS_FUNCTEXCEPT_H is set
 #endif
-
-#endif
index f5c68c7e2a7edc1e25646954b7f201b1543a2a3b..d44e79959d27549400fdc486e6eb3f4d478d02f9 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_DETAIL_GROUPVARINTDETAIL_H_
-#define FOLLY_DETAIL_GROUPVARINTDETAIL_H_
+#pragma once
 
 #include <stddef.h>
 
@@ -99,5 +98,3 @@ class GroupVarintBase {
 
 }  // namespace detail
 }  // namespace folly
-
-#endif /* FOLLY_DETAIL_GROUPVARINTDETAIL_H_ */
index 1136c83222af4077eef64923de74208d5a0f0eda..4a7fa73b313b3d356f6e4bb8aca3daf9bae7809e 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_DETAIL_MALLOC_H
-#define FOLLY_DETAIL_MALLOC_H
+#pragma once
 
 #include <stdlib.h>
 
@@ -84,5 +83,3 @@ extern int (*mallctlbymib)(const size_t*, size_t, void*, size_t*, void*,
 #endif
 
 }
-
-#endif
index 4b11c720ecda44dfef4f86d9b5f5653942e6db21..e4bebc3427f220151b1087893ed02ff997029bf9 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_DETAIL_MEMORYIDLER_H
-#define FOLLY_DETAIL_MEMORYIDLER_H
+#pragma once
 
 #include <atomic>
 #include <chrono>
@@ -149,5 +148,3 @@ struct MemoryIdler {
 };
 
 }} // namespace folly::detail
-
-#endif
index 9e6700469cb4d2ccf40b97d5ba4d6dee4685923d..f7c8a4a50d050eff90b2b9043e32880355a35457 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_DETAIL_RANGE_COMMON_H_
-#define FOLLY_DETAIL_RANGE_COMMON_H_
+#pragma once
 
 #include <algorithm>
 #include <string>
@@ -86,5 +85,3 @@ inline size_t qfind_first_byte_of_nosse(const StringPieceLite haystack,
 }
 
 }
-
-#endif
index 142f057d70136c53c7153cf26daa3c20e40b4346..e0578202e94e668f61f37560cc36c9e06ae1640d 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_DETAIL_RANGE_SSE42_H_
-#define FOLLY_DETAIL_RANGE_SSE42_H_
+#pragma once
 
 #include <cstddef>
 #include <folly/detail/RangeCommon.h>
@@ -30,5 +29,3 @@ size_t qfind_first_byte_of_sse42(const StringPieceLite haystack,
 }
 
 }
-
-#endif
index 73e192529a38b28aec5b4151a3bfc9a82346d3b7..1bbbda61bba607853482f4f209047ca26b7b8a78 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_DETAIL_SLOWFINGERPRINT_H_
-#define FOLLY_DETAIL_SLOWFINGERPRINT_H_
+#pragma once
 
 #include <folly/Fingerprint.h>
 #include <folly/detail/FingerprintPolynomial.h>
@@ -88,5 +87,3 @@ class SlowFingerprint {
 
 }  // namespace detail
 }  // namespace folly
-
-#endif /* FOLLY_DETAIL_SLOWFINGERPRINT_H_ */
index 5d960664e2aa983da1da95029144329fbaf0f3df..1620cb5db6fcb50dbf5f00a0a5d47a7cb69a1e9c 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_DETAIL_STATS_H_
-#define FOLLY_DETAIL_STATS_H_
+#pragma once
 
 #include <chrono>
 #include <cstdint>
@@ -123,5 +122,3 @@ struct Bucket {
 };
 
 }} // folly::detail
-
-#endif // FOLLY_DETAIL_STATS_H_
index 57d1767e7ec7d71ffca13e486ad0e76c70ed1ca1..23c566f09812784d2d1103b52acef7a6b99dfbc4 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_DETAIL_THREADLOCALDETAIL_H_
-#define FOLLY_DETAIL_THREADLOCALDETAIL_H_
+#pragma once
 
 #include <limits.h>
 #include <pthread.h>
@@ -359,5 +358,3 @@ struct StaticMeta : StaticMetaBase {
 
 }  // namespace threadlocal_detail
 }  // namespace folly
-
-#endif /* FOLLY_DETAIL_THREADLOCALDETAIL_H_ */
index b0119c0646e79da54d8882559ff6acd01b0299c6..0fb76c7a3d035751ada22a0bbf2b35a5f3ede5b7 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_DETAIL_UNCAUGHTEXCEPTIONCOUNTER_H_
-#define FOLLY_DETAIL_UNCAUGHTEXCEPTIONCOUNTER_H_
+#pragma once
 
 #include <exception>
 
@@ -93,5 +92,3 @@ inline int UncaughtExceptionCounter::getUncaughtExceptionCount() noexcept {
 }
 
 }} // namespaces
-
-#endif /* FOLLY_DETAIL_UNCAUGHTEXCEPTIONCOUNTER_H_ */
index cea7f2830d82c5ebf410480f5a77d7b9f04747e4..b357d3eee5754896ae32357701fbed509ec0346b 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_DYNAMIC_INL_H_
-#define FOLLY_DYNAMIC_INL_H_
+#pragma once
 
 #include <functional>
 #include <boost/iterator/iterator_adaptor.hpp>
@@ -874,5 +873,3 @@ class FormatValue<detail::DefaultValueWrapper<dynamic, V>> {
 }  // namespaces
 
 #undef FB_DYNAMIC_APPLY
-
-#endif
index ef4fdf682d6a792cb42447cada369eaa512295cf..c2ab2a4bb4d035fb0158297568a799673bb2dd4a 100644 (file)
@@ -60,8 +60,7 @@
  * @author Jordan DeLong <delong.j@fb.com>
  */
 
-#ifndef FOLLY_DYNAMIC_H_
-#define FOLLY_DYNAMIC_H_
+#pragma once
 
 #include <cstdint>
 #include <initializer_list>
@@ -588,5 +587,3 @@ private:
 }
 
 #include <folly/dynamic-inl.h>
-
-#endif
index 7dcd3340eb26814947a74889eeb56875b0326661..738e820abd7c3123357c51634013b3fea9d3cc2b 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_EXPERIMENTAL_BIT_VECTOR_CODING_H
-#define FOLLY_EXPERIMENTAL_BIT_VECTOR_CODING_H
+#pragma once
 
 #include <cstdlib>
 #include <limits>
@@ -448,5 +447,3 @@ class BitVectorReader {
 };
 
 }}  // namespaces
-
-#endif  // FOLLY_EXPERIMENTAL_BIT_VECTOR_CODING_H
index 19c1de281905c300169e63cb707e1d1c3b66b27c..50836ed8fd3e650a0ae15cdfc43c047ca82f3f71 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_EXPERIMENTAL_BITS_H_
-#define FOLLY_EXPERIMENTAL_BITS_H_
+#pragma once
 
 #include <cstddef>
 #include <type_traits>
@@ -304,5 +303,3 @@ inline size_t Bits<T, Traits>::count(const T* begin, const T* end) {
 }
 
 }  // namespace folly
-
-#endif /* FOLLY_EXPERIMENTAL_BITS_H_ */
index c586a6d5b1cc895a857e4aac98b28aa6318bd953..9f3b874402d6b995e6117972a97bd17e33e5dfb2 100644 (file)
@@ -21,8 +21,7 @@
  * "Quasi-succinct indices" (arxiv:1206.4300).
  */
 
-#ifndef FOLLY_EXPERIMENTAL_ELIAS_FANO_CODING_H
-#define FOLLY_EXPERIMENTAL_ELIAS_FANO_CODING_H
+#pragma once
 
 #include <cstdlib>
 #include <limits>
@@ -684,5 +683,3 @@ class EliasFanoReader {
 };
 
 }}  // namespaces
-
-#endif  // FOLLY_EXPERIMENTAL_ELIAS_FANO_CODING_H
index 8c9fde823682402159ae6e8a3856e829b2f2b401..e0f5a94d6975988ce885c264f0632a69e0d8062e 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_EXPERIMENTAL_EVENTCOUNT_H_
-#define FOLLY_EXPERIMENTAL_EVENTCOUNT_H_
+#pragma once
 
 #include <unistd.h>
 #include <syscall.h>
@@ -210,5 +209,3 @@ void EventCount::await(Condition condition) {
 }
 
 }  // namespace folly
-
-#endif /* FOLLY_EXPERIMENTAL_EVENTCOUNT_H_ */
index 08976f07b58e319732368baa06e37228b3301830..e3c0d132e3e83a18b8c16fd94f6ae5547d4aa693 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_EXPERIMENTAL_FUNCTION_SCHEDULER_H_
-#define FOLLY_EXPERIMENTAL_FUNCTION_SCHEDULER_H_
+#pragma once
 
 #include <folly/Range.h>
 #include <chrono>
@@ -263,5 +262,3 @@ class FunctionScheduler {
 };
 
 }
-
-#endif
index 732dd25395ecb653b154afdec50becf73a195ff8..97386ff16b5311cbddd7c9b48bd9cee95b45702c 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_EXPERIMENTAL_INSTRUCTIONS_H
-#define FOLLY_EXPERIMENTAL_INSTRUCTIONS_H
+#pragma once
 
 #include <glog/logging.h>
 
@@ -75,5 +74,3 @@ struct Haswell : public Nehalem {
 };
 
 }}}  // namespaces
-
-#endif  // FOLLY_EXPERIMENTAL_INSTRUCTIONS_H
index daa1188c4bb036278ce8f5001389053cb56c66dd..0a807a2106bedcdf019507f18c46fe1b21856da1 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_NESTEDCOMMANDLINEAPP_H_
-#define FOLLY_NESTEDCOMMANDLINEAPP_H_
+#pragma once
 
 #include <functional>
 #include <stdexcept>
@@ -151,5 +150,3 @@ class NestedCommandLineApp {
 };
 
 }  // namespaces
-
-#endif /* FOLLY_NESTEDCOMMANDLINEAPP_H_ */
index 355b66f0e84ededd435b74e26b9327ad4c908925..b51b98998771e28a0131d234c04445d64d62ca59 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_PROGRAMOPTIONS_H_
-#define FOLLY_PROGRAMOPTIONS_H_
+#pragma once
 
 #include <boost/program_options.hpp>
 #include <folly/Optional.h>
@@ -83,5 +82,3 @@ NestedCommandLineParseResult parseNestedCommandLine(
     const boost::program_options::options_description& desc);
 
 }  // namespaces
-
-#endif /* FOLLY_PROGRAMOPTIONS_H_ */
index bee6970b06d2b41c0b8d68cf6195269a732bf0a8..9c2e03f90aebc788e9cb992f36825092d8574d63 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_EXPERIMENTAL_SELECT64_H
-#define FOLLY_EXPERIMENTAL_SELECT64_H
+#pragma once
 
 #include <glog/logging.h>
 
@@ -77,5 +76,3 @@ inline uint64_t select64<compression::instructions::Haswell>(uint64_t x,
 }
 
 } // namespace folly
-
-#endif
index f6816c9d8d9cd44cf669e179cb37028b0be95e84..26eed9efaced84a89419fa8d8af1b3c33621b09b 100644 (file)
@@ -16,8 +16,7 @@
 // Copyright 2013-present Facebook. All Rights Reserved.
 // @author: Pavlo Kushnir (pavlo)
 
-#ifndef FOLLY_EXPERIMENTAL_STRINGKEYEDCOMMON_H_
-#define FOLLY_EXPERIMENTAL_STRINGKEYEDCOMMON_H_
+#pragma once
 
 #include <memory>
 #include <folly/Range.h>
@@ -40,5 +39,3 @@ void stringPieceDel(StringPiece piece, const Alloc& alloc) {
 }
 
 } // folly
-
-#endif /* FOLLY_EXPERIMENTAL_STRINGKEYEDCOMMON_H_ */
index 1481c1e7df91447f090458d70f58a0772b64bede..93d4559c310e92cc34af723cccd880e3baf3b5d7 100644 (file)
@@ -16,8 +16,7 @@
 // Copyright 2013-present Facebook. All Rights Reserved.
 // @author: Pavlo Kushnir (pavlo)
 
-#ifndef FOLLY_EXPERIMENTAL_STRINGKEYEDMAP_H_
-#define FOLLY_EXPERIMENTAL_STRINGKEYEDMAP_H_
+#pragma once
 
 #include <initializer_list>
 #include <memory>
@@ -200,5 +199,3 @@ public:
 };
 
 } // folly
-
-#endif /* FOLLY_EXPERIMENTAL_STRINGKEYEDMAP_H_ */
index 0b7abbbc71edc15aaa5c0fb849e65ba6d14b55f8..f7e433bc6d6e513714ab917f1cfede6cbf6609ce 100644 (file)
@@ -16,8 +16,7 @@
 // Copyright 2013-present Facebook. All Rights Reserved.
 // @author: Pavlo Kushnir (pavlo)
 
-#ifndef FOLLY_EXPERIMENTAL_STRINGKEYEDSET_H_
-#define FOLLY_EXPERIMENTAL_STRINGKEYEDSET_H_
+#pragma once
 
 #include <initializer_list>
 #include <memory>
@@ -185,5 +184,3 @@ public:
 using StringKeyedSet = StringKeyedSetBase<>;
 
 } // folly
-
-#endif /* FOLLY_EXPERIMENTAL_STRINGKEYEDSET_H_ */
index e31f96f5db55abc0479d6f9c0d0800ced298b82e..59aa139f496c58b9d03682e7b88a291669fcb075 100644 (file)
@@ -16,8 +16,7 @@
 // Copyright 2013-present Facebook. All Rights Reserved.
 // @author: Pavlo Kushnir (pavlo)
 
-#ifndef FOLLY_EXPERIMENTAL_STRINGKEYEDUNORDEREDMAP_H_
-#define FOLLY_EXPERIMENTAL_STRINGKEYEDUNORDEREDMAP_H_
+#pragma once
 
 #include <initializer_list>
 #include <memory>
@@ -227,5 +226,3 @@ public:
 };
 
 } // folly
-
-#endif /* FOLLY_EXPERIMENTAL_STRINGKEYEDUNORDEREDMAP_H_ */
index 1b33bfbf4c4b365662ae6611ab197974a566c809..e52feaa58546229a858913e425324017509ff8d7 100644 (file)
@@ -16,8 +16,7 @@
 // Copyright 2013-present Facebook. All Rights Reserved.
 // @author: Pavlo Kushnir (pavlo)
 
-#ifndef FOLLY_EXPERIMENTAL_STRINGKEYEDUNORDEREDSET_H_
-#define FOLLY_EXPERIMENTAL_STRINGKEYEDUNORDEREDSET_H_
+#pragma once
 
 #include <initializer_list>
 #include <memory>
@@ -221,5 +220,3 @@ public:
 typedef BasicStringKeyedUnorderedSet<> StringKeyedUnorderedSet;
 
 } // folly
-
-#endif /* FOLLY_EXPERIMENTAL_STRINGKEYEDUNORDEREDSET_H_ */
index 98af4c4179a505d728f57a75b41dbfc0ad78409a..f5fb1638dc2b994c2ef32e5cc0a67e81d55b6515 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_TESTUTIL_H_
-#define FOLLY_TESTUTIL_H_
+#pragma once
 
 #include <map>
 #include <string>
@@ -213,5 +212,3 @@ private:
 
 }  // namespace test
 }  // namespace folly
-
-#endif /* FOLLY_TESTUTIL_H_ */
index c9b05bf8229aa44542eb522b8564e4688c27ea25..65e30863016a217f55cf7f95332eaa56880b2ec3 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_TUPLEOPS_H_
-#define FOLLY_TUPLEOPS_H_
+#pragma once
 
 #include <limits>
 #include <tuple>
@@ -123,5 +122,3 @@ auto tuplePrepend(T&& car, U&& cdr)
 }
 
 }  // namespaces
-
-#endif /* FOLLY_TUPLEOPS_H_ */
index 0fbea89f08750cef004a7ba1492f668793d78003..9cee64fcab6897f1738930bfcdaba2a989c967e5 100644 (file)
@@ -14,9 +14,7 @@
  * limitations under the License.
  */
 
-
-#ifndef FOLLY_EXPERIMENTAL_EXCEPTION_TRACER_EXCEPTIONABI_H_
-#define FOLLY_EXPERIMENTAL_EXCEPTION_TRACER_EXCEPTIONABI_H_
+#pragma once
 
 // A clone of the relevant parts of unwind-cxx.h from libstdc++
 // The layout of these structures is defined by the ABI.
@@ -56,5 +54,3 @@ __cxa_eh_globals* __cxa_get_globals_fast(void) noexcept;
 }
 
 }  // namespace __cxxabiv1
-
-#endif /* FOLLY_EXPERIMENTAL_EXCEPTION_TRACER_EXCEPTIONABI_H_ */
index 3b7416a3a55cb68b33e5c0f28457eb07236c5c07..f356b9bb6d2300fdb6442a594d54b13fa7cab6a9 100644 (file)
@@ -17,8 +17,7 @@
 //
 // Exception tracer library.
 
-#ifndef FOLLY_EXPERIMENTAL_EXCEPTION_TRACER_EXCEPTIONTRACER_H_
-#define FOLLY_EXPERIMENTAL_EXCEPTION_TRACER_EXCEPTIONTRACER_H_
+#pragma once
 
 #include <cstdint>
 #include <iosfwd>
@@ -51,5 +50,3 @@ void installHandlers();
 
 }  // namespace exception_tracer
 }  // namespace folly
-
-#endif /* FOLLY_EXPERIMENTAL_EXCEPTION_TRACER_EXCEPTIONTRACER_H_ */
index 72d1631147b73c3ec58d960011e41364c9e18fad..73d1f3a38009c662371b5a7e2c8ed104f0aa7745 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_EXPERIMENTAL_EXCEPTION_TRACER_EXCEPTIONTRACERLIB_H_
-#define FOLLY_EXPERIMENTAL_EXCEPTION_TRACER_EXCEPTIONTRACERLIB_H_
+#pragma once
 
 #include <typeinfo>
 #include <exception>
@@ -50,5 +49,3 @@ void registerCxaEndCatchCallback(CxaEndCatchType callback);
 void registerRethrowExceptionCallback(RethrowExceptionType callback);
 }
 }
-
-#endif /* FOLLY_EXPERIMENTAL_EXCEPTION_TRACER_EXCEPTIONTRACERLIB_H_ */
index 4a7e58f7b6fa9122fdfda848e10b17830e3f816d..11a606481f1a0664085c4675757f970e60086418 100644 (file)
@@ -14,9 +14,7 @@
  * limitations under the License.
  */
 
-
-#ifndef FOLLY_EXPERIMENTAL_EXCEPTION_TRACER_STACKTRACE_H_
-#define FOLLY_EXPERIMENTAL_EXCEPTION_TRACER_STACKTRACE_H_
+#pragma once
 
 #include <cassert>
 #include <cstddef>
@@ -98,5 +96,3 @@ class StackTraceStack {
 };
 
 }}  // namespaces
-
-#endif /* FOLLY_EXPERIMENTAL_EXCEPTION_TRACER_STACKTRACE_H_ */
index 6b3dfe0b002c9daca9cf4023f0b547dd94caf140..6a9ee6a4164e875c546a7d0e74c22a33522bc0bf 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_IO_ASYNCIO_H_
-#define FOLLY_IO_ASYNCIO_H_
+#pragma once
 
 #include <sys/types.h>
 #include <sys/uio.h>
@@ -251,5 +250,3 @@ class AsyncIOQueue {
 };
 
 }  // namespace folly
-
-#endif /* FOLLY_IO_ASYNCIO_H_ */
index fe677921e802b6c9cdc1c7ab9b7c59cf016e2fd0..85606d1c53cc06346f1c764599deef30033779b2 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_IO_FSUTIL_H_
-#define FOLLY_IO_FSUTIL_H_
+#pragma once
 
 #include <boost/filesystem.hpp>
 
@@ -68,5 +67,3 @@ path executable_path();
 
 }  // namespace fs
 }  // namespace folly
-
-#endif /* FOLLY_IO_FSUTIL_H_ */
index d1d2317826162404d829c512a33bc45e4fb86986..8d5619a2b62a5c0fa0d89277f1b05e7d10e4e5cc 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_IO_HUGEPAGES_H_
-#define FOLLY_IO_HUGEPAGES_H_
+#pragma once
 
 #include <sys/stat.h>
 #include <sys/types.h>
@@ -79,5 +78,3 @@ const HugePageSize* getHugePageSize(size_t size = 0);
 const HugePageSize* getHugePageSizeForDevice(dev_t device);
 
 }  // namespace folly
-
-#endif /* FOLLY_IO_HUGEPAGES_H_ */
index ba48486f9dac2a4e4d2f05ecb45a14f0e8bc0972..ed7d1ae82cab9e4d662459ba29591dc0912bc1f1 100644 (file)
@@ -16,8 +16,7 @@
 
 // DWARF record parser
 
-#ifndef FOLLY_EXPERIMENTAL_SYMBOLIZER_DWARF_H_
-#define FOLLY_EXPERIMENTAL_SYMBOLIZER_DWARF_H_
+#pragma once
 
 #include <boost/variant.hpp>
 
@@ -276,5 +275,3 @@ inline std::ostream& operator<<(std::ostream& out, const Dwarf::Path& path) {
 
 }  // namespace symbolizer
 }  // namespace folly
-
-#endif /* FOLLY_EXPERIMENTAL_SYMBOLIZER_DWARF_H_ */
index 9e2908dcf7e812310cddf940cec57bd0133188a9..176a9e89cecc649acfc02f5061a125b0a223fd55 100644 (file)
@@ -16,7 +16,7 @@
 
 // ELF file parser
 
-#ifndef FOLLY_EXPERIMENTAL_SYMBOLIZER_ELF_H_
+#pragma once
 #define FOLLY_EXPERIMENTAL_SYMBOLIZER_ELF_H_
 
 #include <stdio.h>
@@ -241,5 +241,3 @@ class ElfFile {
 }  // namespace folly
 
 #include <folly/experimental/symbolizer/Elf-inl.h>
-
-#endif /* FOLLY_EXPERIMENTAL_SYMBOLIZER_ELF_H_ */
index 671b263b4a8991fd3b8aad58577922e762a40cb5..eb01d210f81a515d515d6cb8c642fc67cde2d151 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_SYMBOLIZER_ELFCACHE_H_
-#define FOLLY_SYMBOLIZER_ELFCACHE_H_
+#pragma once
 
 #include <cstring>
 #include <limits.h>  // for PATH_MAX
@@ -130,5 +129,3 @@ class ElfCache : public ElfCacheBase {
 };
 
 }}  // namespaces
-
-#endif /* FOLLY_SYMBOLIZER_ELFCACHE_H_ */
index c1efb4e3120dd0d1af8dacfeb801a02a269039eb..6137627ee5e594a2bdf18cf5947e07a4af1dde88 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_SYMBOLIZER_LINEREADER_H_
-#define FOLLY_SYMBOLIZER_LINEREADER_H_
+#pragma once
 
 #include <cstddef>
 
@@ -86,5 +85,3 @@ class LineReader : private boost::noncopyable {
 };
 
 }}  // namespaces
-
-#endif /* FOLLY_SYMBOLIZER_LINEREADER_H_ */
index 1dad2173b79d96b771e23572b629d3acb7f9f245..726c8a81e707bf10c1dc156485e5252ccad501cf 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_SYMBOLIZER_SIGNALHANDLER_H_
-#define FOLLY_SYMBOLIZER_SIGNALHANDLER_H_
+#pragma once
 
 #include <functional>
 
@@ -51,5 +50,3 @@ void installFatalSignalCallbacks();
 
 
 }}  // namespaces
-
-#endif /* FOLLY_SYMBOLIZER_SIGNALHANDLER_H_ */
index 8f6c28a3b284b988ed7de96f8b1f5770c5649741..9fc8afa7d946caf673c34385e100f60f11d323f2 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_SYMBOLIZER_STACKTRACE_H_
-#define FOLLY_SYMBOLIZER_STACKTRACE_H_
+#pragma once
 
 #include <cstdint>
 #include <cstdlib>
@@ -45,5 +44,3 @@ ssize_t getStackTrace(uintptr_t* addresses, size_t maxAddresses);
 ssize_t getStackTraceSafe(uintptr_t* addresses, size_t maxAddresses);
 
 }}  // namespaces
-
-#endif /* FOLLY_SYMBOLIZER_STACKTRACE_H_ */
index cad7013e15f72467206cc93e3afe5a6efe538746..232cb30bed9dd5f9311f589633c9331aeb58130e 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_EXPERIMENTAL_SYMBOLIZER_SYMBOLIZER_H_
-#define FOLLY_EXPERIMENTAL_SYMBOLIZER_SYMBOLIZER_H_
+#pragma once
 
 #include <array>
 #include <cstdint>
@@ -295,5 +294,3 @@ class StringSymbolizePrinter : public SymbolizePrinter {
 
 }  // namespace symbolizer
 }  // namespace folly
-
-#endif /* FOLLY_EXPERIMENTAL_SYMBOLIZER_SYMBOLIZER_H_ */
index 2a195a98f22ebc491bcc0d27360687199603a889..6a7d8b7a228af4c1a0c0e2511cd9201a2a528eaf 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_SYMBOLIZER_TEST_SIGNALHANDLERTEST_H_
-#define FOLLY_SYMBOLIZER_TEST_SIGNALHANDLERTEST_H_
+#pragma once
 
 namespace folly { namespace symbolizer { namespace test {
 
@@ -24,5 +23,3 @@ inline void failHard() {
 }
 
 }}}  // namespaces
-
-#endif /* FOLLY_SYMBOLIZER_TEST_SIGNALHANDLERTEST_H_ */
index 9c25ad1a7c5ef38d0129c32e8cc49941a5fcfb68..d16f31e72a60b0b1c81fcaa199c7d5f9beb57065 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_EXPERIMENTAL_CODING_TEST_UTILS_H
-#define FOLLY_EXPERIMENTAL_CODING_TEST_UTILS_H
+#pragma once
 
 #include <algorithm>
 #include <fstream>
@@ -371,5 +370,3 @@ void bmJumpTo(const List& list, const std::vector<uint32_t>& data,
 }
 
 }}  // namespaces
-
-#endif  // FOLLY_EXPERIMENTAL_CODING_TEST_UTILS_H
index 3b756fbc5ef5d79a0c5712623d5c84784e16a94f..11308b3ea7d71fdd95472247ed04dabe69f7a945 100644 (file)
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_GEN_BASE_H
+#ifndef FOLLY_GEN_BASE_H_
 #error This file may only be included from folly/gen/Base.h
 #endif
 
index 9cd8e8f0c850174b5fab9cfe66b53273a3fc4158..6cf05d1721a277a471002ffc0193d35f382ffb4f 100644 (file)
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_GEN_BASE_H
-#define FOLLY_GEN_BASE_H
+#pragma once
+#define FOLLY_GEN_BASE_H_
 
 #include <algorithm>
 #include <functional>
@@ -826,5 +826,3 @@ UnwrapOr unwrapOr(Fallback&& fallback) {
 }} // folly::gen
 
 #include <folly/gen/Base-inl.h>
-
-#endif // FOLLY_GEN_BASE_H
index 0ce96b0ed0a0e3097deb7d7ae468c497b5c7cee1..994d93c9a191d8bf5fb6cb03daee17c28e24859d 100644 (file)
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_GEN_COMBINE_H
+#ifndef FOLLY_GEN_COMBINE_H_
 #error This file may only be included from folly/gen/Combine.h
 #endif
 
index 243350d8903bd784133242d21f6addc295103184..bd9362e2e3a780d8d42063af8e34d95922f38bd4 100644 (file)
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_GEN_COMBINE_H
-#define FOLLY_GEN_COMBINE_H
+#pragma once
+#define FOLLY_GEN_COMBINE_H_
 
 #include <folly/gen/Base.h>
 
@@ -42,5 +42,3 @@ Interleave interleave(Source2&& source2) {
 }  // namespace folly
 
 #include <folly/gen/Combine-inl.h>
-
-#endif // FOLLY_GEN_COMBINE_H
index 8e6f02f2ed03e68ef7b395c0138021e572d8a3ac..4f22d9b3c2196241b86217aa6873a53972d88a7b 100644 (file)
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_GEN_CORE_H
+#ifndef FOLLY_GEN_CORE_H_
 #error This file may only be included from folly/gen/Core.h
 #endif
 
index 59455da26a4451e1de1a87ddf920859fbfa33131..6bfc7cf09e3439f166640a9a7c968d894f92a917 100644 (file)
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_GEN_CORE_H
-#define FOLLY_GEN_CORE_H
+#pragma once
+#define FOLLY_GEN_CORE_H_
 
 namespace folly { namespace gen {
 
@@ -41,5 +41,3 @@ class Chain;
 }} // folly::gen
 
 #include <folly/gen/Core-inl.h>
-
-#endif // FOLLY_GEN_CORE_H
index 4de5f5889fcf78dd6e52c09b588a96bc1eeb255e..98981ef9f143a9a709dd8e79c068a980b5ee5847 100644 (file)
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_GEN_FILE_H
+#ifndef FOLLY_GEN_FILE_H_
 #error This file may only be included from folly/gen/File.h
 #endif
 
index 1c5a36d4516bddb92396a3c7a004a07ba0087ce8..cc031698fcd49842fb62452f21085565e1130e0a 100644 (file)
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_GEN_FILE_H
-#define FOLLY_GEN_FILE_H
+#pragma once
+#define FOLLY_GEN_FILE_H_
 
 #include <folly/File.h>
 #include <folly/gen/Base.h>
@@ -68,5 +68,3 @@ S toFile(File file, std::unique_ptr<IOBuf> buffer) {
 }}  // !folly::gen
 
 #include <folly/gen/File-inl.h>
-
-#endif // FOLLY_GEN_FILE_H
index 74cf955e1807ef045f3b6fadad320bd5b1486976..106ae9457293e58cedeb1ac22730e6e6a4d78ce8 100644 (file)
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_GEN_PARALLEL_H_
+#pragma once
 #define FOLLY_GEN_PARALLEL_H_
 
 #include <mutex>
@@ -106,5 +106,3 @@ Sub sub(Sink sink) {
 }} // !namespace folly::gen
 
 #include <folly/gen/Parallel-inl.h>
-
-#endif /* FOLLY_GEN_PARALLEL_H_ */
index fcabf5b9fdbe4edca353636bda9e82f406e8f78b..eb2899cd42c4a73a0d4d2909b54a1b1380810d2c 100644 (file)
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_GEN_PARALLELMAP_H
+#ifndef FOLLY_GEN_PARALLELMAP_H_
 #error This file may only be included from folly/gen/ParallelMap.h
 #endif
 
index 35aa970b8df62b6985508c412b218b9ecae1e9f1..9a3e3c7e7cc75ee7a2d59bf098c2d01a05815fd8 100644 (file)
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_GEN_PARALLELMAP_H
-#define FOLLY_GEN_PARALLELMAP_H
+#pragma once
+#define FOLLY_GEN_PARALLELMAP_H_
 
 #include <folly/gen/Core.h>
 
@@ -46,5 +46,3 @@ template<class Predicate,
 }}  // namespaces
 
 #include <folly/gen/ParallelMap-inl.h>
-
-#endif  // FOLLY_GEN_PARALLELMAP_H
index 64cd3cc016cd6f661134e12aca0f23dafed7d3b5..e87974da00cedccb5a32dd8cf86e9544d3c5f4a4 100644 (file)
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_GEN_STRING_H
+#ifndef FOLLY_GEN_STRING_H_
 #error This file may only be included from folly/gen/String.h
 #endif
 
index 40ce1712cc76418cece06f0231142786e65b6a58..ac3c2998951681e63c1f23df9e51efa957184eb5 100644 (file)
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_GEN_STRING_H
-#define FOLLY_GEN_STRING_H
+#pragma once
+#define FOLLY_GEN_STRING_H_
 
 #include <folly/Range.h>
 #include <folly/gen/Base.h>
@@ -246,5 +246,3 @@ StreamSplitter<Callback> streamSplitter(char delimiter,
 }  // namespace folly
 
 #include <folly/gen/String-inl.h>
-
-#endif // FOLLY_GEN_STRING_H
index d86a7efacbeb27e90b37e25a99429115568cfa67..a4104598e838b0831d02df5639837f2dd6ee9d1f 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_GEN_BENCH_H_
-#define FOLLY_GEN_BENCH_H_
+#pragma once
 
 #include <folly/Benchmark.h>
 
@@ -31,5 +30,3 @@ static bool FB_ANONYMOUS_VARIABLE(benchGen) = (             \
     }), true)
 #define BENCH_GEN(gen) BENCH_GEN_IMPL(gen, "")
 #define BENCH_GEN_REL(gen) BENCH_GEN_IMPL(gen, "%")
-
-#endif
index 8c1bc7e535f63a30973001bfdf11e08f5b8f437b..52e96f25e24dd92e25d53e9e12d04fb4bb03ba26 100644 (file)
@@ -13,8 +13,8 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-#ifndef INIT_LIGHT_BASE_H
-#define INIT_LIGHT_BASE_H
+
+#pragma once
 
 /*
  * Calls common init functions in the necessary order
@@ -31,5 +31,3 @@ namespace folly {
 void init(int* argc, char*** argv, bool removeFlags = true);
 
 } // folly
-
-#endif
index 540a08a1559fbfb20f1ec9ec7f2623a5ea77610b..3575d8e4837acbb91f565bbcbf4a2941b7486a65 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_IO_COMPRESSION_H_
-#define FOLLY_IO_COMPRESSION_H_
+#pragma once
 
 #include <cstdint>
 #include <limits>
@@ -180,5 +179,3 @@ std::unique_ptr<Codec> getCodec(CodecType type,
                                 int level = COMPRESSION_LEVEL_DEFAULT);
 
 }}  // namespaces
-
-#endif /* FOLLY_IO_COMPRESSION_H_ */
index d1ec9636429d7f39f0db2957ca8ea1d55825226f..74412ea6720cdb95c6aa6830e0dff4a464de40b5 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_CURSOR_H
-#define FOLLY_CURSOR_H
+#pragma once
 
 #include <assert.h>
 #include <cstdarg>
@@ -922,5 +921,3 @@ class QueueAppender : public detail::Writable<QueueAppender> {
 };
 
 }}  // folly::io
-
-#endif // FOLLY_CURSOR_H
index 5262fb5f5b70e4d76aaa74947299130408e12c89..f6a43d66bdc54722638923acfb35bfe533dfb00b 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_IO_IOBUF_H_
-#define FOLLY_IO_IOBUF_H_
+#pragma once
 
 #include <glog/logging.h>
 #include <atomic>
@@ -1467,5 +1466,3 @@ inline IOBuf::Iterator IOBuf::end() const { return cend(); }
 } // folly
 
 #pragma GCC diagnostic pop
-
-#endif // FOLLY_IO_IOBUF_H_
index 81ffe92a20ef4c392931835edbc74e801985cdc7..d421f917a0df2378cd06b8310d4dad0a0776bc66 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_IO_IOBUF_QUEUE_H
-#define FOLLY_IO_IOBUF_QUEUE_H
+#pragma once
 
 #include <folly/io/IOBuf.h>
 
@@ -295,5 +294,3 @@ class IOBufQueue {
 };
 
 } // folly
-
-#endif // FOLLY_IO_IOBUF_QUEUE_H
index faf89029f2532fe66fa443a02af00a5cd7675233..6a89ce812706fd066f36e46fde7631797bcd0492 100644 (file)
@@ -22,7 +22,8 @@
  * or deleted chunks of the file, or modified data.  When reading, you may lose
  * corrupted records, but the stream will resynchronize automatically.
  */
-#ifndef FOLLY_IO_RECORDIO_H_
+
+#pragma once
 #define FOLLY_IO_RECORDIO_H_
 
 #include <atomic>
@@ -176,5 +177,3 @@ RecordInfo validateRecord(ByteRange range, uint32_t fileId);
 }  // namespaces
 
 #include <folly/io/RecordIO-inl.h>
-
-#endif /* FOLLY_IO_RECORDIO_H_ */
index e958490c106eb57b89d331c76fd9072e1a20672f..0a58bbc69edc9baae304e493cadb1a80935bf21e 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_IO_TYPEDIOBUF_H_
-#define FOLLY_IO_TYPEDIOBUF_H_
+#pragma once
 
 #include <algorithm>
 #include <iterator>
@@ -214,5 +213,3 @@ class TypedIOBuf {
 };
 
 }  // namespace folly
-
-#endif /* FOLLY_IO_TYPEDIOBUF_H_ */
index 2854b76a5f8f5024276bfb22b46e77e74806a2d2..b3ed871a8bccc1125bd24da61a2d8a7a016b86bf 100644 (file)
@@ -38,8 +38,7 @@
  * @author Jordan DeLong <delong.j@fb.com>
  */
 
-#ifndef FOLLY_JSON_H_
-#define FOLLY_JSON_H_
+#pragma once
 
 #include <iosfwd>
 
@@ -168,5 +167,3 @@ void PrintTo(const dynamic&, std::ostream*);
 //////////////////////////////////////////////////////////////////////
 
 }
-
-#endif
index 7ea46300491057d5fdddbdd95fa1c4ba2e4dab28..3625e265f6fe6de0d1a3c60239361dbbdad63bdf 100755 (executable)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_CONSTEXPR_H_
-#define FOLLY_CONSTEXPR_H_
+#pragma once
 
 #include <cstdint>
 #include <cstring>
@@ -50,5 +49,3 @@ constexpr size_t constexpr_strlen(const char* s) {
 #endif
 }
 }
-
-#endif
index 976ecccc2d6893e1338c564b73347a672814662d..d28c6a281eabd774acff06a44398e37c3b76b349 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_GFLAGS_H_
-#define FOLLY_GFLAGS_H_
+#pragma once
 
 #include <folly/Portability.h>
 
@@ -24,5 +23,3 @@
 #else
 #define DEFINE_int32(_name, _default, _description) int FLAGS_##_name = _default
 #endif
-
-#endif
index e0ab7f37d7c53f37399a4d83ea5b996637bb7fa6..9640f6803410b81a11f9529ca30092dad5177b4b 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_SYSUIO_H_
-#define FOLLY_SYSUIO_H_
+#pragma once
 
 #include <sys/uio.h>
 
@@ -27,5 +26,3 @@ constexpr size_t kIovMax = IOV_MAX;
 constexpr size_t kIovMax = UIO_MAXIOV;
 #endif
 }
-
-#endif
index 4707a1466c97a711fb08b885fda98f3466ebb4e4..b81d318adf49f95a752f979167665e8a6f469087 100644 (file)
@@ -20,8 +20,8 @@
  *
  * @author Jordan DeLong <delong.j@fb.com>
  */
-#ifndef FOLLY_SMALL_VECTOR_H_
-#define FOLLY_SMALL_VECTOR_H_
+
+#pragma once
 
 #include <stdexcept>
 #include <cstdlib>
@@ -1160,5 +1160,3 @@ struct IndexableTraits<small_vector<T, M, A, B, C>>
 # undef FB_PACK_PUSH
 # undef FB_PACK_POP
 #endif
-
-#endif
index 99019d0d50c25960fc09eff7fc99b33a97c39c7a..b9354b10cbb9bdd7e4ae49e7f4b1336c9dfa8b00 100644 (file)
@@ -57,8 +57,7 @@
  *     std::vector<>, which requires it to be Assignable.)
  */
 
-#ifndef FOLLY_SORTED_VECTOR_TYPES_H_
-#define FOLLY_SORTED_VECTOR_TYPES_H_
+#pragma once
 
 #include <algorithm>
 #include <initializer_list>
@@ -654,5 +653,3 @@ inline void swap(sorted_vector_map<K,V,C,A,G>& a,
 //////////////////////////////////////////////////////////////////////
 
 }
-
-#endif
index e9a749a7b43f21152b6f3d6d9bfaf2f757f7e501..a726f2ee54d517a4e2535eaa58d118ca9345a604 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_STATS_BUCKETEDTIMESERIES_INL_H_
-#define FOLLY_STATS_BUCKETEDTIMESERIES_INL_H_
+#pragma once
 
 #include <algorithm>
 #include <glog/logging.h>
@@ -461,5 +460,3 @@ void BucketedTimeSeries<VT, TT>::forEachBucket(TimeType start, TimeType end,
 }
 
 } // folly
-
-#endif // FOLLY_STATS_BUCKETEDTIMESERIES_INL_H_
index 8ce00b2b18edea17d4c748239aefabfa255037c6..c3c2c1e4d111dc9187d21175b8428183c1853c70 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_STATS_BUCKETEDTIMESERIES_H_
-#define FOLLY_STATS_BUCKETEDTIMESERIES_H_
+#pragma once
 
 #include <chrono>
 #include <vector>
@@ -406,5 +405,3 @@ class BucketedTimeSeries {
 };
 
 } // folly
-
-#endif // FOLLY_STATS_BUCKETEDTIMESERIES_H_
index fe102bf2c5558f86ac19312719eb4b374eb2a508..8d4af44fd48062b689dab41fa54c14ec3b4eb38d 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_HISTOGRAM_DEFS_H_
-#define FOLLY_HISTOGRAM_DEFS_H_
+#pragma once
 
 #include <folly/Conv.h>
 
@@ -278,5 +277,3 @@ void Histogram<T>::toTSV(std::ostream& out, bool skipEmptyBuckets) const {
 }
 
 } // folly
-
-#endif // FOLLY_HISTOGRAM_DEFS_H_
index beda7c8278ef25cd4ce280d10e0d8d52df7e3732..0b9baba1246f492c0aa281b578a6df8a73a1c433 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_HISTOGRAM_H_
-#define FOLLY_HISTOGRAM_H_
+#pragma once
 
 #include <cstddef>
 #include <limits>
@@ -466,5 +465,3 @@ class Histogram {
 };
 
 } // folly
-
-#endif // FOLLY_HISTOGRAM_H_
index 396c9049037a97f8d6689885a8932291522abbbd..686dafa6d965cc48a9681487831a30b7a43f0ef7 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_STATS_MULTILEVELTIMESERIES_DEFS_H_
-#define FOLLY_STATS_MULTILEVELTIMESERIES_DEFS_H_
+#pragma once
 
 #include <glog/logging.h>
 
@@ -100,5 +99,3 @@ void MultiLevelTimeSeries<VT, TT>::clear() {
 }
 
 }  // folly
-
-#endif // FOLLY_STATS_MULTILEVELTIMESERIES_DEFS_H_
index e8de444380637cd6184a041df732b69752d5f678..f38b4e9f53503a44c443427bd21fd870d90476cd 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_STATS_MULTILEVELTIMESERIES_H_
-#define FOLLY_STATS_MULTILEVELTIMESERIES_H_
+#pragma once
 
 #include <chrono>
 #include <string>
@@ -311,5 +310,3 @@ class MultiLevelTimeSeries {
 };
 
 } // folly
-
-#endif // FOLLY_STATS_MULTILEVELTIMESERIES_H_
index ff88c0e6f53057553013d49698ce1924e0032636..f546d8bcf3b3632ad1ceb981e724570a0b720ec2 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_TIMESERIES_HISTOGRAM_DEF_H_
-#define FOLLY_TIMESERIES_HISTOGRAM_DEF_H_
+#pragma once
 
 #include <folly/Conv.h>
 #include <folly/stats/Histogram-defs.h>
@@ -227,5 +226,3 @@ std::string TimeseriesHistogram<T, TT, C>::getString(TimeType start,
 }
 
 }  // namespace folly
-
-#endif
index 7f58b0d2fd5f69ea37026584da1b78aeea82d667..2f3cc75f5bbbf6f9b72e832abef53ea772bf9545 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_TIMESERIES_HISTOGRAM_H_
-#define FOLLY_TIMESERIES_HISTOGRAM_H_
+#pragma once
 
 #include <string>
 #include <boost/static_assert.hpp>
@@ -331,5 +330,3 @@ class TimeseriesHistogram {
 };
 
 }  // folly
-
-#endif  // FOLLY_TIMESERIES_HISTOGRAM_H_
index 5399f127fd2b73a07cbb76ff0814aef3904a78b7..1517730ea6f0db6e06deb17e6b106d2ffcae5944 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_TEST_SYNCHRONIZEDTESTLIB_INL_H
-#define FOLLY_TEST_SYNCHRONIZEDTESTLIB_INL_H
+#pragma once
 
 #include <gtest/gtest.h>
 
@@ -353,6 +352,3 @@ template <class Mutex> void testInPlaceConstruction() {
     folly::construct_in_place, 5, "a"
   );
 }
-
-
-#endif  /* FOLLY_TEST_SYNCHRONIZEDTESTLIB_INL_H */
index 349ed12b4c688c9a75cc508b7f4e96386ee87ce4..8e73273d0209da831639d10baedd8fe387fd2f51 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_TEST_SYNCHRONIZEDTESTLIB_H
-#define FOLLY_TEST_SYNCHRONIZEDTESTLIB_H
+#pragma once
 
 // We have mutex types outside of folly that we want to test with Synchronized.
 // Make it easy for mutex implementators to test their classes with
@@ -47,5 +46,3 @@ template <class Mutex> void testConstCopy();
 template <class Mutex> void testInPlaceConstruction();
 
 #include <folly/test/SynchronizedTestLib-inl.h>
-
-#endif /* FOLLY_TEST_SYNCHRONIZEDTESTLIB_H */
index 1c7b4acdec4fac54a2c2e43028fc3c08f05d8e2f..14a6012db664cf27e7efa058c6fa6bc5fb6ab78d 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef FOLLY_TESTUTILS_H
-#define FOLLY_TESTUTILS_H
+#pragma once
 
 #include <gtest/gtest.h>
 
@@ -25,5 +24,3 @@
 // a normal test failure; there is only an effect if the test framework
 // interprets the message.
 #define SKIP() GTEST_FATAL_FAILURE_("Test skipped by client")
-
-#endif // FOLLY_TESTUTILS_H
index d7766fbc8f98f75f5d533d02d368cf497c1cd4e0..b6865f7a7c5e1db6a4161f909b79b305a6093123 100644 (file)
@@ -13,8 +13,8 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-#ifndef BENCHMARK_IMPL_H_
-#define BENCHMARK_IMPL_H_
+
+#pragma once
 
 #include <functional>
 
@@ -49,5 +49,3 @@ void BM_invoke_fn_template_impl(int iters, const T& fn) {
     fn();
   }
 }
-
-#endif // BENCHMARK_IMPL_H_
index 382ac39da82afef03ebce15530fe2a4e2ec88bdc..e248aa63b03366626af048422cedcd0169c6e17b 100644 (file)
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-#ifndef TEST_FUNCTIONS_H_
-#define TEST_FUNCTIONS_H_
+#pragma once
 
 #include <exception>
 #include <functional>
@@ -54,5 +53,3 @@ class LargeClass {
   // Avoid small object optimization.
   char data[1024];
 };
-
-#endif // TEST_FUNCTIONS_H_