aboutsummaryrefslogtreecommitdiff
path: root/source/SmallVector.hpp
diff options
context:
space:
mode:
authorhnOsmium0001 <[email protected]>2022-04-25 20:22:07 -0700
committerhnOsmium0001 <[email protected]>2022-04-25 20:22:07 -0700
commitf54370de7e4214cb7813d26b1a39a8f6e42b7b56 (patch)
tree20913b4099b77af933fcd2ebb4e73f53b366ad8f /source/SmallVector.hpp
parentc8ebee643f23c34ff57f69f8dfcf1903b59ea9d1 (diff)
Initial work on rendering sprites to screen
Diffstat (limited to 'source/SmallVector.hpp')
-rw-r--r--source/SmallVector.hpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/SmallVector.hpp b/source/SmallVector.hpp
index 9461800..e33a25d 100644
--- a/source/SmallVector.hpp
+++ b/source/SmallVector.hpp
@@ -36,6 +36,14 @@
# pragma warning(disable : 4267) // The compiler detected a conversion from size_t to a smaller type.
#endif
+#if __has_builtin(__builtin_expect) || defined(__GNUC__)
+# define LLVM_LIKELY(EXPR) __builtin_expect((bool)(EXPR), true)
+# define LLVM_UNLIKELY(EXPR) __builtin_expect((bool)(EXPR), false)
+#else
+# define LLVM_LIKELY(EXPR) (EXPR)
+# define LLVM_UNLIKELY(EXPR) (EXPR)
+#endif
+
template <typename IteratorT>
class iterator_range;