diff options
author | Neil <nyamatongwe@gmail.com> | 2015-01-22 15:13:18 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2015-01-22 15:13:18 +1100 |
commit | c2cfd294d21e6da8a86191bdd00af0772379737c (patch) | |
tree | aaa48f3e5b258a8d7f299ae732ca0793ace54435 | |
parent | 4a7c0965659d0b99b9a68c19480272e049cc26fa (diff) | |
download | scintilla-mirror-c2cfd294d21e6da8a86191bdd00af0772379737c.tar.gz |
Fix compilation failure of C++11 <regex> on Windows using gcc.
-rw-r--r-- | doc/ScintillaHistory.html | 3 | ||||
-rw-r--r-- | src/Document.cxx | 9 |
2 files changed, 8 insertions, 4 deletions
diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index ea7cce1fa..9efc5c982 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -493,6 +493,9 @@ Add new indicator INDIC_COMPOSITIONTHIN to mimic the appearance of non-target segments in OS X IME. </li> + <li> + Fix compilation failure of C++11 <regex> on Windows using gcc. + </li> </ul> <h3> <a href="http://prdownloads.sourceforge.net/scintilla/scite353.zip?download">Release 3.5.3</a> diff --git a/src/Document.cxx b/src/Document.cxx index c88f8ba42..a44a51f12 100644 --- a/src/Document.cxx +++ b/src/Document.cxx @@ -2347,6 +2347,9 @@ public: doc(doc_), position(position_), characterIndex(0), lenBytes(0), lenCharacters(0) { buffered[0] = 0; buffered[1] = 0; + if (doc) { + ReadCharacter(); + } } UTF8Iterator(const UTF8Iterator &other) { doc = other.doc; @@ -2369,10 +2372,8 @@ public: } return *this; } - wchar_t operator*() { - if (lenCharacters == 0) { - ReadCharacter(); - } + wchar_t operator*() const { + assert(lenCharacters != 0); return buffered[characterIndex]; } UTF8Iterator &operator++() { |