diff options
author | Neil <nyamatongwe@gmail.com> | 2014-03-18 09:53:08 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2014-03-18 09:53:08 +1100 |
commit | c84fd8d919c0fd00ecf93a9264260a74a26f2f10 (patch) | |
tree | 629dc9a703248f6f103d9181605d4ee12158d6c9 /src | |
parent | ce485ff65d257dc4f19c21f40b82cac437e76196 (diff) | |
download | scintilla-mirror-c84fd8d919c0fd00ecf93a9264260a74a26f2f10.tar.gz |
Minor tweaks to avoid ststic checking warnings.
Diffstat (limited to 'src')
-rw-r--r-- | src/Editor.cxx | 2 | ||||
-rw-r--r-- | src/Editor.h | 6 | ||||
-rw-r--r-- | src/ViewStyle.cxx | 6 | ||||
-rw-r--r-- | src/ViewStyle.h | 2 |
4 files changed, 8 insertions, 8 deletions
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<styles.size(); j++) { - CreateFont(styles[j]); + CreateAndAddFont(styles[j]); } for (FontMap::iterator it = fonts.begin(); it != fonts.end(); ++it) { @@ -498,7 +498,7 @@ void ViewStyle::AllocStyles(size_t sizeNew) { } } -void ViewStyle::CreateFont(const FontSpecification &fs) { +void ViewStyle::CreateAndAddFont(const FontSpecification &fs) { if (fs.fontName) { FontMap::iterator it = fonts.find(fs); if (it == fonts.end()) { diff --git a/src/ViewStyle.h b/src/ViewStyle.h index da8b7e141..91b51b2ad 100644 --- a/src/ViewStyle.h +++ b/src/ViewStyle.h @@ -178,7 +178,7 @@ public: private: void AllocStyles(size_t sizeNew); - void CreateFont(const FontSpecification &fs); + void CreateAndAddFont(const FontSpecification &fs); FontRealised *Find(const FontSpecification &fs); void FindMaxAscentDescent(); // Private so can only be copied through copy constructor which ensures font names initialised correctly |