From 24796f9cd61426321ec102e1b795cd92e7a4f7e8 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Wed, 22 Apr 2009 13:20:43 +0000 Subject: Removed Document methods that returned parts of annotations in favour of methods that return StyledText objects. Provided LineLength call on StyledText rather than iterator objects. Simplified code and made more things const. --- src/PerLine.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/PerLine.cxx') diff --git a/src/PerLine.cxx b/src/PerLine.cxx index b90416abb..466d2fb31 100644 --- a/src/PerLine.cxx +++ b/src/PerLine.cxx @@ -377,9 +377,9 @@ const char *LineAnnotation::Text(int line) const { return 0; } -const char *LineAnnotation::Styles(int line) const { +const unsigned char *LineAnnotation::Styles(int line) const { if (annotations.Length() && (line < annotations.Length()) && annotations[line] && MultipleStyles(line)) - return annotations[line] + sizeof(AnnotationHeader) + Length(line); + return reinterpret_cast(annotations[line] + sizeof(AnnotationHeader) + Length(line)); else return 0; } @@ -428,7 +428,7 @@ void LineAnnotation::SetStyle(int line, int style) { reinterpret_cast(annotations[line])->style = static_cast(style); } -void LineAnnotation::SetStyles(int line, const char *styles) { +void LineAnnotation::SetStyles(int line, const unsigned char *styles) { annotations.EnsureLength(line+1); if (!annotations[line]) { annotations[line] = AllocateAnnotation(0, IndividualStyles); -- cgit v1.2.3