Skip to content

Commit

Permalink
Bug 896341 - Update include guards and modelines in MFBT; r=Waldo
Browse files Browse the repository at this point in the history
  • Loading branch information
Ms2ger committed Jul 24, 2013
1 parent 438ac30 commit 51f3918
Show file tree
Hide file tree
Showing 42 changed files with 218 additions and 183 deletions.
9 changes: 5 additions & 4 deletions mfbt/AllocPolicy.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Expand All @@ -8,8 +9,8 @@
* control how memory is allocated and how failures are handled.
*/

#ifndef mozilla_AllocPolicy_h_
#define mozilla_AllocPolicy_h_
#ifndef mozilla_AllocPolicy_h
#define mozilla_AllocPolicy_h

#include <stddef.h>
#include <stdlib.h>
Expand Down Expand Up @@ -59,4 +60,4 @@ class MallocAllocPolicy

} // namespace mozilla

#endif // mozilla_AllocPolicy_h_
#endif /* mozilla_AllocPolicy_h */
9 changes: 5 additions & 4 deletions mfbt/Array.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

/* A compile-time constant-length array with bounds-checking assertions. */

#ifndef mozilla_Array_h_
#define mozilla_Array_h_
#ifndef mozilla_Array_h
#define mozilla_Array_h

#include "mozilla/Assertions.h"
#include "mozilla/Attributes.h"
Expand Down Expand Up @@ -47,4 +48,4 @@ class Array<T, 0>

} /* namespace mozilla */

#endif /* mozilla_Array_h_ */
#endif /* mozilla_Array_h */
9 changes: 5 additions & 4 deletions mfbt/Assertions.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

/* Implementations of runtime and static assertion macros for C and C++. */

#ifndef mozilla_Assertions_h_
#define mozilla_Assertions_h_
#ifndef mozilla_Assertions_h
#define mozilla_Assertions_h

#include "mozilla/Attributes.h"
#include "mozilla/Compiler.h"
Expand Down Expand Up @@ -455,4 +456,4 @@ __declspec(noreturn) __inline void MOZ_NoReturn() {}
# define MOZ_ALWAYS_FALSE(expr) ((void)(expr))
#endif

#endif /* mozilla_Assertions_h_ */
#endif /* mozilla_Assertions_h */
9 changes: 5 additions & 4 deletions mfbt/Atomics.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Expand All @@ -12,8 +13,8 @@
* sent a copy of this header and the C++11 standard.
*/

#ifndef mozilla_Atomics_h_
#define mozilla_Atomics_h_
#ifndef mozilla_Atomics_h
#define mozilla_Atomics_h

#include "mozilla/Assertions.h"
#include "mozilla/TypeTraits.h"
Expand Down Expand Up @@ -957,4 +958,4 @@ class Atomic<T*, Order> : public detail::AtomicBase<T*, Order>

} // namespace mozilla

#endif /* mozilla_Atomics_h_ */
#endif /* mozilla_Atomics_h */
9 changes: 5 additions & 4 deletions mfbt/Attributes.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

/* Implementations of various class and method modifier attributes. */

#ifndef mozilla_Attributes_h_
#define mozilla_Attributes_h_
#ifndef mozilla_Attributes_h
#define mozilla_Attributes_h

#include "mozilla/Compiler.h"

Expand Down Expand Up @@ -427,4 +428,4 @@

#endif /* __cplusplus */

#endif /* mozilla_Attributes_h_ */
#endif /* mozilla_Attributes_h */
13 changes: 7 additions & 6 deletions mfbt/BloomFilter.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

/*
* A counting Bloom filter implementation. This allows consumers to
Expand All @@ -10,8 +11,8 @@
* incorrectly answer "yes" when the correct answer is "no").
*/

#ifndef mozilla_BloomFilter_h_
#define mozilla_BloomFilter_h_
#ifndef mozilla_BloomFilter_h
#define mozilla_BloomFilter_h

#include "mozilla/Assertions.h"
#include "mozilla/Likely.h"
Expand Down Expand Up @@ -231,4 +232,4 @@ BloomFilter<KeySize, T>::mightContain(const T* t) const

} // namespace mozilla

#endif /* mozilla_BloomFilter_h_ */
#endif /* mozilla_BloomFilter_h */
9 changes: 5 additions & 4 deletions mfbt/Casting.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

/* Cast operations to supplement the built-in casting operations. */

#ifndef mozilla_Casting_h_
#define mozilla_Casting_h_
#ifndef mozilla_Casting_h
#define mozilla_Casting_h

#include "mozilla/Assertions.h"
#include "mozilla/TypeTraits.h"
Expand Down Expand Up @@ -198,4 +199,4 @@ SafeCast(const From from)

} // namespace mozilla

#endif /* mozilla_Casting_h_ */
#endif /* mozilla_Casting_h */
9 changes: 5 additions & 4 deletions mfbt/Char16.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

/* Implements a UTF-16 character type. */

#ifndef mozilla_Char16_h_
#define mozilla_Char16_h_
#ifndef mozilla_Char16_h
#define mozilla_Char16_h

#include "mozilla/Assertions.h"

Expand Down Expand Up @@ -53,4 +54,4 @@ MOZ_STATIC_ASSERT(sizeof(char16_t) == 2, "Is char16_t type 16 bits?");
MOZ_STATIC_ASSERT(sizeof(MOZ_UTF16('A')) == 2, "Is char literal 16 bits?");
MOZ_STATIC_ASSERT(sizeof(MOZ_UTF16("")[0]) == 2, "Is string char 16 bits?");

#endif /* mozilla_Char16_h_ */
#endif /* mozilla_Char16_h */
13 changes: 7 additions & 6 deletions mfbt/CheckedInt.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

/* Provides checked integers, detecting integer overflow and divide-by-0. */

#ifndef mozilla_CheckedInt_h_
#define mozilla_CheckedInt_h_
#ifndef mozilla_CheckedInt_h
#define mozilla_CheckedInt_h

// Enable relying of Mozilla's MFBT for possibly-available C++11 features
#define MOZ_CHECKEDINT_USE_MFBT
Expand Down Expand Up @@ -875,4 +876,4 @@ typedef CheckedInt<uint64_t> CheckedUint64;

} // namespace mozilla

#endif /* mozilla_CheckedInt_h_ */
#endif /* mozilla_CheckedInt_h */
9 changes: 5 additions & 4 deletions mfbt/Compiler.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

/* Various compiler checks. */

#ifndef mozilla_Compiler_h_
#define mozilla_Compiler_h_
#ifndef mozilla_Compiler_h
#define mozilla_Compiler_h

#if !defined(__clang__) && defined(__GNUC__)

Expand All @@ -28,4 +29,4 @@

#endif

#endif /* mozilla_Compiler_h_ */
#endif /* mozilla_Compiler_h */
9 changes: 5 additions & 4 deletions mfbt/Constants.h
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

/* mfbt math constants. */

#ifndef mozilla_Constants_h_
#define mozilla_Constants_h_
#ifndef mozilla_Constants_h
#define mozilla_Constants_h

#ifndef M_PI
# define M_PI 3.14159265358979323846
#endif

#endif /* mozilla_Constants_h_ */
#endif /* mozilla_Constants_h */
9 changes: 5 additions & 4 deletions mfbt/DebugOnly.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Expand All @@ -8,8 +9,8 @@
* assertions).
*/

#ifndef mozilla_DebugOnly_h_
#define mozilla_DebugOnly_h_
#ifndef mozilla_DebugOnly_h
#define mozilla_DebugOnly_h

namespace mozilla {

Expand Down Expand Up @@ -74,4 +75,4 @@ class DebugOnly

}

#endif /* mozilla_DebugOnly_h_ */
#endif /* mozilla_DebugOnly_h */
9 changes: 5 additions & 4 deletions mfbt/Endian.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Expand Down Expand Up @@ -59,8 +60,8 @@
* };
*/

#ifndef mozilla_Endian_h_
#define mozilla_Endian_h_
#ifndef mozilla_Endian_h
#define mozilla_Endian_h

#include "mozilla/Assertions.h"
#include "mozilla/Attributes.h"
Expand Down Expand Up @@ -636,4 +637,4 @@ class NativeEndian MOZ_FINAL : public detail::Endian<MOZ_NATIVE_ENDIANNESS>

} /* namespace mozilla */

#endif /* mozilla_Endian_h_ */
#endif /* mozilla_Endian_h */
5 changes: 3 additions & 2 deletions mfbt/EnumSet.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Expand Down Expand Up @@ -172,4 +173,4 @@ class EnumSet

} // namespace mozilla

#endif // mozilla_EnumSet_h_
#endif /* mozilla_EnumSet_h_*/
13 changes: 7 additions & 6 deletions mfbt/FloatingPoint.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

/* Various predicates and operations on IEEE-754 floating point types. */

#ifndef mozilla_FloatingPoint_h_
#define mozilla_FloatingPoint_h_
#ifndef mozilla_FloatingPoint_h
#define mozilla_FloatingPoint_h

#include "mozilla/Assertions.h"
#include "mozilla/Attributes.h"
Expand Down Expand Up @@ -206,4 +207,4 @@ DoublesAreIdentical(double d1, double d2)

} /* namespace mozilla */

#endif /* mozilla_FloatingPoint_h_ */
#endif /* mozilla_FloatingPoint_h */
3 changes: 2 additions & 1 deletion mfbt/GuardObjects.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
Expand Down
14 changes: 8 additions & 6 deletions mfbt/HashFunctions.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

/* Utilities for hashing. */

Expand Down Expand Up @@ -42,8 +43,8 @@
* in nsHashKeys.h.
*/

#ifndef mozilla_HashFunctions_h_
#define mozilla_HashFunctions_h_
#ifndef mozilla_HashFunctions_h
#define mozilla_HashFunctions_h

#include "mozilla/Assertions.h"
#include "mozilla/Attributes.h"
Expand Down Expand Up @@ -356,4 +357,5 @@ HashBytes(const void* bytes, size_t length);

} /* namespace mozilla */
#endif /* __cplusplus */
#endif /* mozilla_HashFunctions_h_ */

#endif /* mozilla_HashFunctions_h */
Loading

0 comments on commit 51f3918

Please sign in to comment.