From 6339dec22e2190fd341500206c80425593324bdc Mon Sep 17 00:00:00 2001 From: John Fultz Date: Sun, 11 Oct 2015 18:19:20 -0500 Subject: Fix up lexicon dialog box checks. Get enables and disables right, efficient computation of word counts, etc. --- quackleio/dawgfactory.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'quackleio/dawgfactory.cpp') diff --git a/quackleio/dawgfactory.cpp b/quackleio/dawgfactory.cpp index 362dfdc..869ef8e 100644 --- a/quackleio/dawgfactory.cpp +++ b/quackleio/dawgfactory.cpp @@ -40,6 +40,7 @@ DawgFactory::DawgFactory(const QString &alphabetFile) m_root.lastchild = true; m_hash.int32ptr[0] = m_hash.int32ptr[1] = m_hash.int32ptr[2] = m_hash.int32ptr[3] = 0; + m_encodableWords = m_unencodableWords = m_duplicateWords = m_wordCount = 0; } DawgFactory::~DawgFactory() @@ -186,10 +187,10 @@ void DawgFactory::writeIndex(const UVString& filename) } } -int DawgFactory::wordCount() const +void DawgFactory::computeWordCount() const { m_countsByLength.resize(0); - return m_root.wordCount(0, m_countsByLength); + m_wordCount = m_root.wordCount(0, m_countsByLength); } string DawgFactory::letterCountString() const -- cgit v1.2.3