From 816bedbd011b6729e8be0a4b40213f48fd9d73ca Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Thu, 27 Oct 2016 20:50:29 -0400 Subject: names, jumping --- include/common.hpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/common.hpp') diff --git a/include/common.hpp b/include/common.hpp index d152bb7..d13e397 100644 --- a/include/common.hpp +++ b/include/common.hpp @@ -58,6 +58,12 @@ typedef unsigned int uint; #define BREAKPOINT __asm__("int $3") +template +inline const T * const& coalesce(const T * const &p1, const T * const &p2) +{ + return ((p1 == nullptr) ? p2 : p1); +} + /** * Creates a coordinate of integers. */ -- cgit v1.2.3