diff options
| author | Neil <nyamatongwe@gmail.com> | 2013-09-04 11:32:27 +1000 |
|---|---|---|
| committer | Neil <nyamatongwe@gmail.com> | 2013-09-04 11:32:27 +1000 |
| commit | 824bda1603222f547f2eb4b37ebf8635fa54b56d (patch) | |
| tree | 0209f30a89c13604194dcb6ff180be61f0a0a913 /gtk/PlatGTK.cxx | |
| parent | 6a97e1876037907f5b7bfd3f006cec783212a7ba (diff) | |
| download | scintilla-mirror-824bda1603222f547f2eb4b37ebf8635fa54b56d.tar.gz | |
Fix namespace compilation errors when SCI_NAMESPACE defined.
Diffstat (limited to 'gtk/PlatGTK.cxx')
| -rw-r--r-- | gtk/PlatGTK.cxx | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/gtk/PlatGTK.cxx b/gtk/PlatGTK.cxx index 00877f130..427f08ec3 100644 --- a/gtk/PlatGTK.cxx +++ b/gtk/PlatGTK.cxx @@ -890,18 +890,6 @@ static size_t MultiByteLenFromIconv(const Converter &conv, const char *s, size_t return 1; } -static size_t UTF8CharLength(const char *s) { - const unsigned char *us = reinterpret_cast<const unsigned char *>(s); - unsigned char ch = *us; - if (ch < 0x80) { - return 1; - } else if (ch < 0x80 + 0x40 + 0x20) { - return 2; - } else { - return 3; - } -} - void SurfaceImpl::DrawTextBase(PRectangle rc, Font &font_, XYPOSITION ybase, const char *s, int len, ColourDesired fore) { PenColour(fore); @@ -1045,7 +1033,7 @@ void SurfaceImpl::MeasureWidths(Font &font_, const char *s, int len, XYPOSITION positions[i++] = iti.position - (places - place) * iti.distance / places; positionsCalculated++; } - clusterStart += UTF8CharLength(utfForm.c_str()+clusterStart); + clusterStart += UTF8CharLength(static_cast<unsigned char>(utfForm.c_str()[clusterStart])); place++; } } |
