Changeset View
Changeset View
Standalone View
Standalone View
plugins/astyle/astyle_stringiterator.cpp
Show First 20 Lines • Show All 68 Lines • ▼ Show 20 Line(s) | |||||
69 | { | 69 | { | ||
70 | if(m_peekStart != -1) | 70 | if(m_peekStart != -1) | ||
71 | m_is.seek(m_peekStart); | 71 | m_is.seek(m_peekStart); | ||
72 | m_peekStart = -1; // invalid | 72 | m_peekStart = -1; // invalid | ||
73 | } | 73 | } | ||
74 | 74 | | |||
75 | astyle::streamoff AStyleStringIterator::getPeekStart() const | 75 | astyle::streamoff AStyleStringIterator::getPeekStart() const | ||
76 | { | 76 | { | ||
77 | return m_peekStart; | 77 | return m_peekStart == -1 ? 0 : m_peekStart; | ||
kossebau: Is there some API dox what one should implement for `getPeekStart()`, especially which values… | |||||
78 | } | 78 | } | ||
79 | 79 | | |||
80 | 80 | |
Is there some API dox what one should implement for getPeekStart(), especially which values are valid?