diff options
author | Matt Liberty <matt.liberty@gmail.com> | 2013-11-03 22:43:22 -0800 |
---|---|---|
committer | Matt Liberty <matt.liberty@gmail.com> | 2013-11-03 22:43:22 -0800 |
commit | ecae4ba252c9b78d6b4fa6d14d2e694b8f71306a (patch) | |
tree | f2a8aaf923a222d223b0d4d86568864c802e2d76 /quackleio | |
parent | 29ef933fda48f30a752e2dac2a8cb3f3d0f513b0 (diff) |
Make clang happy (for Mavericks)
Diffstat (limited to 'quackleio')
-rw-r--r-- | quackleio/dict.cpp | 10 | ||||
-rw-r--r-- | quackleio/dict.h | 8 |
2 files changed, 9 insertions, 9 deletions
diff --git a/quackleio/dict.cpp b/quackleio/dict.cpp index e949ef0..8a59a76 100644 --- a/quackleio/dict.cpp +++ b/quackleio/dict.cpp @@ -14,7 +14,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301 USA */ @@ -42,7 +42,7 @@ void WordList::setSortBy(SortType _sortType) sortType = _sortType; } -bool operator<(const Dict::Word &word1, const Dict::Word &word2) +bool Dict::operator<(const Dict::Word &word1, const Dict::Word &word2) { switch (Dict::WordList::sortType) { @@ -52,15 +52,15 @@ bool operator<(const Dict::Word &word1, const Dict::Word &word2) case Dict::WordList::Playability: if (word1.playability != word2.playability) return word1.playability > word2.playability; - + if (word1.word.length() != word2.word.length()) return word1.word.length() < word2.word.length(); // fall through - + case Dict::WordList::Probability: return word1.probability > word2.probability; - + case Dict::WordList::Length: case Dict::WordList::LengthLongestFirst: { diff --git a/quackleio/dict.h b/quackleio/dict.h index 4935e4b..49b9286 100644 --- a/quackleio/dict.h +++ b/quackleio/dict.h @@ -55,6 +55,10 @@ private: ExtensionList getExtensionList(bool front) const; }; +// Returns true if word1 is less playable than word2; +// otherwise returns false. +bool operator<(const Dict::Word &word1, const Dict::Word &word2); + class WordList : public QList<Word> { public: @@ -84,8 +88,4 @@ public: } -// Returns true if word1 is less playable than word2; -// otherwise returns false. -bool operator<(const Dict::Word &word1, const Dict::Word &word2); - #endif |