From: mental Date: Mon, 5 Mar 2007 06:07:39 +0000 (+0000) Subject: fix NR::Maybe typos X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=8e2a7ea74c6f59f3316b61a00b16490cd0f97bf3;p=inkscape.git fix NR::Maybe typos --- diff --git a/src/libnr/nr-maybe.h b/src/libnr/nr-maybe.h index 679cd9d57..6749dfc01 100644 --- a/src/libnr/nr-maybe.h +++ b/src/libnr/nr-maybe.h @@ -30,7 +30,7 @@ class Maybe { public: Maybe(Nothing) : _is_nothing(true) {} Maybe(T const &t) : _t(t), _is_nothing(false) {} - Maybe(Maybe const &m) : _t(*m._t), _is_nothing(m._is_nothing) {} + Maybe(Maybe const &m) : _t(m._t), _is_nothing(m._is_nothing) {} template Maybe(Maybe const &m) : _is_nothing(!m) @@ -163,7 +163,7 @@ public: Maybe(Maybe const &m) : _ref(m._ref) {} template Maybe(Maybe const &m) - : _ref( m ? *m : NULL ) {} + : _ref( m ? &*m : NULL ) {} template Maybe(T2 &t) : _ref(&t) {} operator bool() const { return _ref; } @@ -195,7 +195,7 @@ public: template bool operator!=(NR::Maybe const &other) const { if ( !_ref || !other ) { - return _ref || _other; + return _ref || other; } else { return *_ref != *other; }