Add overloaded operator-> to agi::line_iterator

Originally committed to SVN as r4846.
This commit is contained in:
Thomas Goyne 2010-11-17 05:44:02 +00:00
parent 1bb8d16a45
commit 75285192a3
2 changed files with 5 additions and 2 deletions

View file

@ -108,9 +108,12 @@ public:
, width(that.width) , width(that.width)
{ {
} }
OutputType operator*() const { OutputType const& operator*() const {
return value; return value;
} }
OutputType const* operator->() const {
return &value;
}
line_iterator<OutputType>& operator++() { line_iterator<OutputType>& operator++() {
next(); next();
return *this; return *this;

View file

@ -234,7 +234,7 @@ void HunspellSpellChecker::SetLanguage(wxString language) {
agi::line_iterator<std::string> end; agi::line_iterator<std::string> end;
++userDic; // skip entry count line ++userDic; // skip entry count line
for (; userDic != end; ++userDic) { for (; userDic != end; ++userDic) {
if ((*userDic).empty()) continue; if (userDic->empty()) continue;
try { try {
#ifdef WITH_OLD_HUNSPELL #ifdef WITH_OLD_HUNSPELL
hunspell->put_word(conv->Convert(*userDic).c_str()); hunspell->put_word(conv->Convert(*userDic).c_str());