diff --git a/src/strbuffer.h b/src/strbuffer.h index 7f11ab0f..c09a54c9 100644 --- a/src/strbuffer.h +++ b/src/strbuffer.h @@ -26,19 +26,19 @@ #include #include -struct FormatPos -{ - size_t Position; - short Value; - - bool operator<(const FormatPos &f) - { - return Position < f.Position; - } -}; - template class basic_buffer { + struct FormatPos + { + size_t Position; + short Value; + + bool operator<(const FormatPos &f) + { + return Position < f.Position; + } + }; + std::basic_ostringstream itsString; std::list itsFormat; std::basic_string *itsTempString; @@ -129,7 +129,7 @@ template basic_buffer &basic_buffer::operator<<(const basic_buff itsString << buf.itsString.str(); std::list tmp = buf.itsFormat; if (len) - for (std::list::iterator it = tmp.begin(); it != tmp.end(); it++) + for (typename std::list::FormatPos>::iterator it = tmp.begin(); it != tmp.end(); it++) it->Position += len; itsFormat.merge(tmp); return *this; @@ -145,7 +145,8 @@ template Window &operator<<(Window &w, const basic_buffer &buf) else { std::basic_string tmp; - std::list::const_iterator b = buf.itsFormat.begin(), e = buf.itsFormat.end(); + typename std::list::FormatPos>::const_iterator b = buf.itsFormat.begin(); + typename std::list::FormatPos>::const_iterator e = buf.itsFormat.end(); for (size_t i = 0; i < s.length() || b != e; i++) { while (b != e && i == b->Position)