diff options
author | John Fultz <jfultz@wolfram.com> | 2015-09-07 14:19:46 -0500 |
---|---|---|
committer | John Fultz <jfultz@wolfram.com> | 2015-09-07 15:45:41 -0500 |
commit | 5350a57f1be22b28914fca14225c73dac5b30b24 (patch) | |
tree | 399a309a1302d30ec83cc5d7281ac7286882523a /fixedstring.h | |
parent | 9ea9637922ca68d24d7517cf61870d8cee31f6c5 (diff) |
Auto-generate gaddags
Need to add a user interface, but gaddags are now
auto-generated if they can't be found.
Some specific improvements here:
* FixedLengthString gained a pop_back member.
* Add code to allow v1 gaddags and v0 dawgs to work
together.
* Change memory allocation of dawgs and gaddags to
be dynamic (the old limit didn't accommodate the
ridiculously large Polish dictionary in the gaddag)
* The Settings class now knows a bit about generating
gaddags. This will be important for giving UI feedback.
* Fixed several places using filenames which should be
using string, not UVString.
* Dawg/GaddagFactory should have been using
UVString, not QString. My misunderstanding.
Diffstat (limited to 'fixedstring.h')
-rw-r--r-- | fixedstring.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/fixedstring.h b/fixedstring.h index e8db0bf..a31ecd6 100644 --- a/fixedstring.h +++ b/fixedstring.h @@ -54,6 +54,7 @@ class FixedLengthString size_type size() const { return length(); } void clear() { m_end = m_data; } void push_back(char c); + void pop_back(); const char* constData() const { return m_data; } int compare(const FixedLengthString& s) const; @@ -221,6 +222,13 @@ FixedLengthString::push_back(char c) *this += c; } +inline void +FixedLengthString::pop_back() +{ + assert(size() > 0); + m_end--; +} + inline int FixedLengthString::compare(const FixedLengthString& s) const { |