aboutsummaryrefslogtreecommitdiffstats
path: root/include/common.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/common.hpp')
-rw-r--r--include/common.hpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/include/common.hpp b/include/common.hpp
index 7b98ea9..3caa083 100644
--- a/include/common.hpp
+++ b/include/common.hpp
@@ -58,11 +58,7 @@ typedef unsigned int uint;
#define BREAKPOINT __asm__("int $3")
-template<typename T>
-inline const T * const& coalesce(const void * &p1, const void * &p2)
-{
- return ((p1 == nullptr) ? reinterpret_cast<T*>(p2) : p1);
-}
+#define coalesce(v1, v2) ((v1 != nullptr) ? v1 : v2)
/**
* Creates a coordinate of integers.