Skip to content
This repository has been archived by the owner on Aug 4, 2022. It is now read-only.

Commit

Permalink
Change preprocessor-directive indentation to be two-space, not one-sp…
Browse files Browse the repository at this point in the history
…ace. rs=cjones in bug 702437
  • Loading branch information
jswalden committed Nov 16, 2011
1 parent bc358d8 commit d50c06d
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 70 deletions.
56 changes: 28 additions & 28 deletions mfbt/Types.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@
* other code needs to see import declarations when using mfbt.
*/
#if defined(IMPL_MFBT)
# define MFBT_API(type_) MOZ_EXPORT_API(type_)
# define MFBT_API(type_) MOZ_EXPORT_API(type_)
#else
# define MFBT_API(type_) MOZ_IMPORT_API(type_)
# define MFBT_API(type_) MOZ_IMPORT_API(type_)
#endif


Expand All @@ -99,32 +99,32 @@
* for forward compatibility.
*/
#if defined(__clang__)
# if __clang_major__ >= 3
# define MOZ_HAVE_CXX11_DELETE
# define MOZ_HAVE_CXX11_OVERRIDE
# elif __clang_major__ == 2
# if __clang_minor__ >= 9
# define MOZ_HAVE_CXX11_DELETE
# if __clang_major__ >= 3
# define MOZ_HAVE_CXX11_DELETE
# define MOZ_HAVE_CXX11_OVERRIDE
# elif __clang_major__ == 2
# if __clang_minor__ >= 9
# define MOZ_HAVE_CXX11_DELETE
# endif
# endif
# endif
#elif defined(__GNUC__)
# if defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L
# if __GNUC__ > 4
# define MOZ_HAVE_CXX11_DELETE
# define MOZ_HAVE_CXX11_OVERRIDE
# elif __GNUC__ == 4
# if __GNUC_MINOR__ >= 7
# define MOZ_HAVE_CXX11_OVERRIDE
# endif
# if __GNUC_MINOR__ >= 4
# define MOZ_HAVE_CXX11_DELETE
# endif
# if defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L
# if __GNUC__ > 4
# define MOZ_HAVE_CXX11_DELETE
# define MOZ_HAVE_CXX11_OVERRIDE
# elif __GNUC__ == 4
# if __GNUC_MINOR__ >= 7
# define MOZ_HAVE_CXX11_OVERRIDE
# endif
# if __GNUC_MINOR__ >= 4
# define MOZ_HAVE_CXX11_DELETE
# endif
# endif
# endif
# endif
#elif defined(_MSC_VER)
# if _MSC_VER >= 1400
# define MOZ_HAVE_CXX11_OVERRIDE
# endif
# if _MSC_VER >= 1400
# define MOZ_HAVE_CXX11_OVERRIDE
# endif
#endif

/*
Expand All @@ -150,9 +150,9 @@
* backstop, method declarations using MOZ_DELETE should be private.
*/
#if defined(MOZ_HAVE_CXX11_DELETE)
# define MOZ_DELETE = delete
# define MOZ_DELETE = delete
#else
# define MOZ_DELETE /* no support */
# define MOZ_DELETE /* no support */
#endif

/*
Expand Down Expand Up @@ -191,9 +191,9 @@
* of course must still be used correctly to not break C++11 compilers).
*/
#if defined(MOZ_HAVE_CXX11_OVERRIDE)
# define MOZ_OVERRIDE override
# define MOZ_OVERRIDE override
#else
# define MOZ_OVERRIDE /* no support */
# define MOZ_OVERRIDE /* no support */
#endif

#endif /* __cplusplus */
Expand Down
76 changes: 34 additions & 42 deletions mfbt/Util.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,10 @@ MOZ_END_EXTERN_C
* which it fails will stop running in a loud and dramatic way.
*/
#ifdef DEBUG

# define MOZ_ASSERT(expr_) \
((expr_) ? (void)0 : JS_Assert(#expr_, __FILE__, __LINE__))

# define MOZ_ASSERT(expr_) \
((expr_) ? (void)0 : JS_Assert(#expr_, __FILE__, __LINE__))
#else

# define MOZ_ASSERT(expr_) ((void)0)

# define MOZ_ASSERT(expr_) ((void)0)
#endif /* DEBUG */

/*
Expand All @@ -86,15 +82,15 @@ MOZ_END_EXTERN_C
* may ignore this directive if it chooses.
*/
#ifndef MOZ_INLINE
# if defined __cplusplus
# define MOZ_INLINE inline
# elif defined _MSC_VER
# define MOZ_INLINE __inline
# elif defined __GNUC__
# define MOZ_INLINE __inline__
# else
# define MOZ_INLINE inline
# endif
# if defined __cplusplus
# define MOZ_INLINE inline
# elif defined _MSC_VER
# define MOZ_INLINE __inline
# elif defined __GNUC__
# define MOZ_INLINE __inline__
# else
# define MOZ_INLINE inline
# endif
#endif

/*
Expand All @@ -105,15 +101,15 @@ MOZ_END_EXTERN_C
* to do so).
*/
#ifndef MOZ_ALWAYS_INLINE
# if defined DEBUG
# define MOZ_ALWAYS_INLINE MOZ_INLINE
# elif defined _MSC_VER
# define MOZ_ALWAYS_INLINE __forceinline
# elif defined __GNUC__
# define MOZ_ALWAYS_INLINE __attribute__((always_inline)) MOZ_INLINE
# else
# define MOZ_ALWAYS_INLINE MOZ_INLINE
# endif
# if defined DEBUG
# define MOZ_ALWAYS_INLINE MOZ_INLINE
# elif defined _MSC_VER
# define MOZ_ALWAYS_INLINE __forceinline
# elif defined __GNUC__
# define MOZ_ALWAYS_INLINE __attribute__((always_inline)) MOZ_INLINE
# else
# define MOZ_ALWAYS_INLINE MOZ_INLINE
# endif
#endif

/*
Expand All @@ -123,13 +119,13 @@ MOZ_END_EXTERN_C
* guaranteed to support this, but most do.
*/
#ifndef MOZ_NEVER_INLINE
# if defined _MSC_VER
# define MOZ_NEVER_INLINE __declspec(noinline)
# elif defined __GNUC__
# define MOZ_NEVER_INLINE __attribute__((noinline))
# else
# define MOZ_NEVER_INLINE
# endif
# if defined _MSC_VER
# define MOZ_NEVER_INLINE __declspec(noinline)
# elif defined __GNUC__
# define MOZ_NEVER_INLINE __attribute__((noinline))
# else
# define MOZ_NEVER_INLINE
# endif
#endif

#ifdef __cplusplus
Expand Down Expand Up @@ -224,18 +220,14 @@ struct AlignmentFinder
*/

#if defined(__GNUC__)
#define MOZ_ALIGNED_DECL(_type, _align) \
_type __attribute__((aligned(_align)))

# define MOZ_ALIGNED_DECL(_type, _align) \
_type __attribute__((aligned(_align)))
#elif defined(_MSC_VER)
#define MOZ_ALIGNED_DECL(_type, _align) \
__declspec(align(_align)) _type

# define MOZ_ALIGNED_DECL(_type, _align) \
__declspec(align(_align)) _type
#else

#warning "We don't know how to align variables on this compiler."
#define MOZ_ALIGNED_DECL(_type, _align) _type

# warning "We don't know how to align variables on this compiler."
# define MOZ_ALIGNED_DECL(_type, _align) _type
#endif

/*
Expand Down

0 comments on commit d50c06d

Please sign in to comment.