From c84fd8d919c0fd00ecf93a9264260a74a26f2f10 Mon Sep 17 00:00:00 2001 From: Neil Date: Tue, 18 Mar 2014 09:53:08 +1100 Subject: Minor tweaks to avoid ststic checking warnings. --- src/Editor.cxx | 2 +- src/Editor.h | 6 +++--- src/ViewStyle.cxx | 6 +++--- src/ViewStyle.h | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/Editor.cxx b/src/Editor.cxx index 7802061f2..ac25189a2 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -1234,7 +1234,7 @@ slop | strict | jumps | even | Caret can go to the margin | When 1 | 1 | 1 | 1 | No, kept out of UZ | moved to put caret at 3UZ of the margin */ -Editor::XYScrollPosition Editor::XYScrollToMakeVisible(const SelectionRange range, const XYScrollOptions options) { +Editor::XYScrollPosition Editor::XYScrollToMakeVisible(const SelectionRange &range, const XYScrollOptions options) { PRectangle rcClient = GetTextRectangle(); Point pt = LocationFromPosition(range.caret); Point ptAnchor = LocationFromPosition(range.anchor); diff --git a/src/Editor.h b/src/Editor.h index c87708e92..588967d64 100644 --- a/src/Editor.h +++ b/src/Editor.h @@ -412,7 +412,7 @@ protected: // ScintillaBase subclass needs access to much of Editor xysVertical=0x2, xysHorizontal=0x4, xysDefault=xysUseMargin|xysVertical|xysHorizontal}; - XYScrollPosition XYScrollToMakeVisible(const SelectionRange range, const XYScrollOptions options); + XYScrollPosition XYScrollToMakeVisible(const SelectionRange &range, const XYScrollOptions options); void SetXYScroll(XYScrollPosition newXY); void EnsureCaretVisible(bool useMargin=true, bool vert=true, bool horiz=true); void ScrollRange(SelectionRange range); @@ -437,12 +437,12 @@ protected: // ScintillaBase subclass needs access to much of Editor ColourDesired SelectionBackground(ViewStyle &vsDraw, bool main) const; ColourDesired TextBackground(ViewStyle &vsDraw, bool overrideBackground, ColourDesired background, int inSelection, bool inHotspot, int styleMain, int i, LineLayout *ll) const; void DrawIndentGuide(Surface *surface, int lineVisible, int lineHeight, int start, PRectangle rcSegment, bool highlight); - void DrawWrapMarker(Surface *surface, PRectangle rcPlace, bool isEndMarker, ColourDesired wrapColour); + static void DrawWrapMarker(Surface *surface, PRectangle rcPlace, bool isEndMarker, ColourDesired wrapColour); void DrawEOL(Surface *surface, ViewStyle &vsDraw, PRectangle rcLine, LineLayout *ll, int line, int lineEnd, int xStart, int subLine, XYACCUMULATOR subLineStart, bool overrideBackground, ColourDesired background, bool drawWrapMark, ColourDesired wrapColour); - void DrawIndicator(int indicNum, int startPos, int endPos, Surface *surface, ViewStyle &vsDraw, + static void DrawIndicator(int indicNum, int startPos, int endPos, Surface *surface, ViewStyle &vsDraw, int xStart, PRectangle rcLine, LineLayout *ll, int subLine); void DrawIndicators(Surface *surface, ViewStyle &vsDraw, int line, int xStart, PRectangle rcLine, LineLayout *ll, int subLine, int lineEnd, bool under); diff --git a/src/ViewStyle.cxx b/src/ViewStyle.cxx index 503775dbf..b1c9dc10b 100644 --- a/src/ViewStyle.cxx +++ b/src/ViewStyle.cxx @@ -310,9 +310,9 @@ void ViewStyle::Refresh(Surface &surface, int tabInChars) { styles[i].extraFontFlag = extraFontFlag; } - CreateFont(styles[STYLE_DEFAULT]); + CreateAndAddFont(styles[STYLE_DEFAULT]); for (unsigned int j=0; j