From: Rudolf Polzer Date: Sun, 9 Feb 2014 17:59:33 +0000 (+0100) Subject: Potentially fix compile with clang. The fix may be dangerous. X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=712d06616182b5b59a0d0406388154d6e4bf4500;p=xonotic%2Fnetradiant.git Potentially fix compile with clang. The fix may be dangerous. I changed how Reference<> types compare - they previously compared by value (which is not even supported in clang), now compare by reference. If this breaks anything, I'll rather undo this and instead make the types used as Reference<> support operator< to compare by value. But I think comparison by reference is actually wanted here. --- diff --git a/libs/generic/reference.h b/libs/generic/reference.h index df5a05a8..141f14f4 100644 --- a/libs/generic/reference.h +++ b/libs/generic/reference.h @@ -49,11 +49,11 @@ Type* get_pointer() const { template bool operator<( const Reference& self, const Reference& other ){ - return self.get() < other.get(); + return self.get_pointer() < other.get_pointer(); } template bool operator==( const Reference& self, const Reference& other ){ - return self.get() == other.get(); + return self.get_pointer() == other.get_pointer(); } /// \brief construct a reference to a mutable object.