From 221158e19aebd65e345fdc8c8d7eccb69ce9f7ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Teuli=C3=A8re?= Date: Sat, 18 Feb 2012 21:19:11 +0100 Subject: [PATCH] Simplify the Tile::operator==() method --- dic/tile.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/dic/tile.cpp b/dic/tile.cpp index 42088ec..28b4c35 100644 --- a/dic/tile.cpp +++ b/dic/tile.cpp @@ -162,13 +162,8 @@ bool Tile::operator<(const Tile &iOther) const bool Tile::operator==(const Tile &iOther) const { - if (m_joker || iOther.m_joker) - { - if (m_joker != iOther.m_joker) - return false; - return m_char == iOther.m_char; - } - return m_char == iOther.m_char; + return m_char == iOther.m_char + && m_joker == iOther.m_joker; }