Menu

#94 SymbolIterator: begin() method is missing

version_0.10
open
nobody
None
5
2019-10-29
2019-10-29
No

When using SymbolIterator, if you want to use it as range iterator (c++11), begin() funtion is missing.
Just adding the following to the class, simply works:

    const SymbolIterator begin() const {
        return(SymbolIterator(*this));
    }

Suggestion: implement also, inside Image class a image.symbolIterator(), becasue calling always symbolBegin() can be missunderstud:

for (auto symbol : image.symbolIterator())
{
    symbol.
}

instead of:

for (auto symbol : image.symbol_begin())
{
    symbol.
}

Discussion


Log in to post a comment.