summaryrefslogtreecommitdiff
path: root/quackleio/dawgfactory.cpp
diff options
context:
space:
mode:
authorJohn Fultz <jfultz@wolfram.com>2015-10-11 18:19:20 -0500
committerJohn Fultz <jfultz@wolfram.com>2015-10-11 18:19:20 -0500
commit6339dec22e2190fd341500206c80425593324bdc (patch)
tree56edb08f484d4c917289bb51e3e4765f524b3400 /quackleio/dawgfactory.cpp
parent69e3dcefb882c743b136df8e5c81b4182b135f6b (diff)
Fix up lexicon dialog box checks.
Get enables and disables right, efficient computation of word counts, etc.
Diffstat (limited to 'quackleio/dawgfactory.cpp')
-rw-r--r--quackleio/dawgfactory.cpp5
1 files changed, 3 insertions, 2 deletions
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