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

Commit

Permalink
Bug 792689 - Add some double negations to the macros in Likely.h; r=W…
Browse files Browse the repository at this point in the history
…aldo
  • Loading branch information
Ms2ger committed Sep 20, 2012
1 parent ed7a04b commit 201d5f6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions mfbt/Likely.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
#define mozilla_Likely_h_

#if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 2))
# define MOZ_LIKELY(x) (__builtin_expect((x), 1))
# define MOZ_UNLIKELY(x) (__builtin_expect((x), 0))
# define MOZ_LIKELY(x) (__builtin_expect(!!(x), 1))
# define MOZ_UNLIKELY(x) (__builtin_expect(!!(x), 0))
#else
# define MOZ_LIKELY(x) (x)
# define MOZ_UNLIKELY(x) (x)
# define MOZ_LIKELY(x) (!!(x))
# define MOZ_UNLIKELY(x) (!!(x))
#endif

#endif /* mozilla_Likely_h_ */

0 comments on commit 201d5f6

Please sign in to comment.