aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Document.cxx6
-rw-r--r--src/Editor.cxx48
-rw-r--r--src/Editor.h2
-rw-r--r--src/KeyWords.cxx2
-rw-r--r--src/LexCPP.cxx4
-rw-r--r--src/LexHTML.cxx30
-rw-r--r--src/LexOthers.cxx16
-rw-r--r--src/LexPerl.cxx6
-rw-r--r--src/LexPython.cxx18
-rw-r--r--src/LexSQL.cxx6
-rw-r--r--src/LexVB.cxx6
-rw-r--r--src/ScintillaBase.cxx4
-rw-r--r--src/ScintillaBase.h2
13 files changed, 81 insertions, 69 deletions
diff --git a/src/Document.cxx b/src/Document.cxx
index fb2650425..7a30d7fd1 100644
--- a/src/Document.cxx
+++ b/src/Document.cxx
@@ -604,7 +604,7 @@ long Document::FindText(int minPos, int maxPos, const char *s, bool caseSensitiv
//Platform::DebugPrintf("Find %d %d %s %d\n", startPos, endPos, ft->lpstrText, lengthFind);
char firstChar = s[0];
if (!caseSensitive)
- firstChar = toupper(firstChar);
+ firstChar = static_cast<char>(toupper(firstChar));
int pos = startPos;
while (forward ? (pos < endSearch) : (pos >= endSearch)) {
char ch = CharAt(pos);
@@ -657,11 +657,11 @@ void Document::ChangeCase(Range r, bool makeUpperCase) {
} else {
if (makeUpperCase) {
if (islower(ch)) {
- ChangeChar(pos, toupper(ch));
+ ChangeChar(pos, static_cast<char>(toupper(ch)));
}
} else {
if (isupper(ch)) {
- ChangeChar(pos, tolower(ch));
+ ChangeChar(pos, static_cast<char>(tolower(ch)));
}
}
}
diff --git a/src/Editor.cxx b/src/Editor.cxx
index 983568ec2..1566ffa6e 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -719,8 +719,8 @@ void Editor::LayoutLine(int line, Surface *surface, ViewStyle &vstyle, LineLayou
styleByte = pdoc->StyleAt(charInDoc);
if (vstyle.viewEOL || ((chDoc != '\r') && (chDoc != '\n'))) {
ll.chars[numCharsInLine] = chDoc;
- ll.styles[numCharsInLine] = styleByte & styleMask;
- ll.indicators[numCharsInLine] = styleByte & ~styleMask;
+ ll.styles[numCharsInLine] = static_cast<char>(styleByte & styleMask);
+ ll.indicators[numCharsInLine] = static_cast<char>(styleByte & ~styleMask);
numCharsInLine++;
}
}
@@ -1059,9 +1059,11 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) {
// Highlight the current braces if any
if ((braces[0] >= posLineStart) && (braces[0] < posLineEnd))
- ll.styles[braces[0] - posLineStart] = bracesMatchStyle;
+ ll.styles[braces[0] - posLineStart] =
+ static_cast<char>(bracesMatchStyle);
if ((braces[1] >= posLineStart) && (braces[1] < posLineEnd))
- ll.styles[braces[1] - posLineStart] = bracesMatchStyle;
+ ll.styles[braces[1] - posLineStart] =
+ static_cast<char>(bracesMatchStyle);
// Draw the line
if (cs.GetVisible(line))
@@ -1428,7 +1430,7 @@ void Editor::DelCharBack() {
void Editor::NotifyFocus(bool) {
}
-void Editor::NotifyStyleNeeded(int endStyleNeeded) {
+void Editor::NotifyStyleToNeeded(int endStyleNeeded) {
SCNotification scn;
scn.nmhdr.code = SCN_STYLENEEDED;
scn.position = endStyleNeeded;
@@ -1436,7 +1438,7 @@ void Editor::NotifyStyleNeeded(int endStyleNeeded) {
}
void Editor::NotifyStyleNeeded(Document*, void *, int endStyleNeeded) {
- NotifyStyleNeeded(endStyleNeeded);
+ NotifyStyleToNeeded(endStyleNeeded);
}
void Editor::NotifyChar(char ch) {
@@ -1641,7 +1643,7 @@ void Editor::NotifyModified(Document*, DocModification mh, void *) {
}
}
-void Editor::NotifyDeleted(Document *document, void *userData) {
+void Editor::NotifyDeleted(Document *, void *) {
/* Do nothing */
}
@@ -2629,12 +2631,13 @@ char BraceOpposite(char ch) {
// TODO: should be able to extend styled region to find matching brace
// TODO: may need to make DBCS safe
// so should be moved into Document
-int Editor::BraceMatch(int position, int maxReStyle) {
+int Editor::BraceMatch(int position, int /*maxReStyle*/) {
char chBrace = pdoc->CharAt(position);
char chSeek = BraceOpposite(chBrace);
- if (!chSeek)
+ if (chSeek != '\0')
return - 1;
- char styBrace = pdoc->StyleAt(position) & pdoc->stylingBitsMask;
+ char styBrace = static_cast<char>(
+ pdoc->StyleAt(position) & pdoc->stylingBitsMask);
int direction = -1;
if (chBrace == '(' || chBrace == '[' || chBrace == '{' || chBrace == '<')
direction = 1;
@@ -2751,6 +2754,11 @@ void Editor::EnsureLineVisible(int line) {
}
}
+static bool ValidMargin(WPARAM wParam) {
+ return (wParam >= 0 && wParam < ViewStyle::margins);
+}
+
+
LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) {
//Platform::DebugPrintf("S start wnd proc %d %d %d\n",iMessage, wParam, lParam);
@@ -3314,11 +3322,11 @@ LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) {
break;
case SCI_STARTSTYLING:
- pdoc->StartStyling(wParam, lParam);
+ pdoc->StartStyling(wParam, static_cast<char>(lParam));
break;
case SCI_SETSTYLING:
- pdoc->SetStyleFor(wParam, lParam);
+ pdoc->SetStyleFor(wParam, static_cast<char>(lParam));
break;
case SCI_SETSTYLINGEX: // Specify a complete styling buffer
@@ -3417,53 +3425,53 @@ LRESULT Editor::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) {
return -1;
case SCI_SETMARGINTYPEN:
- if (wParam >= 0 && wParam < ViewStyle::margins) {
+ if (ValidMargin(wParam)) {
vs.ms[wParam].symbol = (lParam == SC_MARGIN_SYMBOL);
InvalidateStyleRedraw();
}
break;
case SCI_GETMARGINTYPEN:
- if (wParam >= 0 && wParam < ViewStyle::margins)
+ if (ValidMargin(wParam))
return vs.ms[wParam].symbol ? SC_MARGIN_SYMBOL : SC_MARGIN_NUMBER;
else
return 0;
case SCI_SETMARGINWIDTHN:
- if (wParam >= 0 && wParam < ViewStyle::margins) {
+ if (ValidMargin(wParam)) {
vs.ms[wParam].width = lParam;
InvalidateStyleRedraw();
}
break;
case SCI_GETMARGINWIDTHN:
- if (wParam >= 0 && wParam < ViewStyle::margins)
+ if (ValidMargin(wParam))
return vs.ms[wParam].width;
else
return 0;
case SCI_SETMARGINMASKN:
- if (wParam >= 0 && wParam < ViewStyle::margins) {
+ if (ValidMargin(wParam)) {
vs.ms[wParam].mask = lParam;
InvalidateStyleRedraw();
}
break;
case SCI_GETMARGINMASKN:
- if (wParam >= 0 && wParam < ViewStyle::margins)
+ if (ValidMargin(wParam))
return vs.ms[wParam].mask;
else
return 0;
case SCI_SETMARGINSENSITIVEN:
- if (wParam >= 0 && wParam < ViewStyle::margins) {
+ if (ValidMargin(wParam)) {
vs.ms[wParam].sensitive = lParam;
InvalidateStyleRedraw();
}
break;
case SCI_GETMARGINSENSITIVEN:
- if (wParam >= 0 && wParam < ViewStyle::margins)
+ if (ValidMargin(wParam))
return vs.ms[wParam].sensitive ? 1 : 0;
else
return 0;
diff --git a/src/Editor.h b/src/Editor.h
index 205baa880..0c04b41cd 100644
--- a/src/Editor.h
+++ b/src/Editor.h
@@ -207,7 +207,7 @@ protected: // ScintillaBase subclass needs access to much of Editor
virtual void NotifyChange() = 0;
virtual void NotifyFocus(bool focus);
virtual void NotifyParent(SCNotification scn) = 0;
- virtual void NotifyStyleNeeded(int endStyleNeeded);
+ virtual void NotifyStyleToNeeded(int endStyleNeeded);
void NotifyChar(char ch);
void NotifySavePoint(bool isSavePoint);
void NotifyModifyAttempt();
diff --git a/src/KeyWords.cxx b/src/KeyWords.cxx
index 7cc69bd28..113ba222d 100644
--- a/src/KeyWords.cxx
+++ b/src/KeyWords.cxx
@@ -26,7 +26,7 @@ LexerModule::LexerModule(int language_, LexerFunction fn_) :
}
void LexerModule::Colourise(unsigned int startPos, int lengthDoc, int initStyle,
- int language, WordList *keywordlists[], BufferAccess &styler) {
+ int language, WordList *keywordlists[], Accessor &styler) {
LexerModule *lm = base;
while (lm) {
if (lm->language == language) {
diff --git a/src/LexCPP.cxx b/src/LexCPP.cxx
index d3c00164f..144648e35 100644
--- a/src/LexCPP.cxx
+++ b/src/LexCPP.cxx
@@ -17,7 +17,7 @@
#include "Scintilla.h"
#include "SciLexer.h"
-static bool classifyWordCpp(unsigned int start, unsigned int end, WordList &keywords, BufferAccess &styler) {
+static bool classifyWordCpp(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler) {
char s[100];
bool wordIsNumber = isdigit(styler[start]) || (styler[start] == '.');
bool wordIsUUID = false;
@@ -39,7 +39,7 @@ static bool classifyWordCpp(unsigned int start, unsigned int end, WordList &keyw
}
static void ColouriseCppDoc(unsigned int startPos, int length, int initStyle, WordList *keywordlists[],
- BufferAccess &styler) {
+ Accessor &styler) {
WordList &keywords = *keywordlists[0];
diff --git a/src/LexHTML.cxx b/src/LexHTML.cxx
index 490bed6ee..87bb29335 100644
--- a/src/LexHTML.cxx
+++ b/src/LexHTML.cxx
@@ -18,11 +18,11 @@
#include "SciLexer.h"
enum { eScriptNone, eScriptJS, eScriptVBS, eScriptPython };
-static int segIsScriptingIndicator(BufferAccess &styler, unsigned int start, unsigned int end, int prevValue) {
+static int segIsScriptingIndicator(Accessor &styler, unsigned int start, unsigned int end, int prevValue) {
char s[100];
s[0] = '\0';
for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) {
- s[i] = tolower(styler[start + i]);
+ s[i] = static_cast<char>(tolower(styler[start + i]));
s[i + 1] = '\0';
}
//Platform::DebugPrintf("Scripting indicator [%s]\n", s);
@@ -38,7 +38,7 @@ static int segIsScriptingIndicator(BufferAccess &styler, unsigned int start, uns
return prevValue;
}
-static void classifyAttribHTML(unsigned int start, unsigned int end, WordList &keywords, BufferAccess &styler) {
+static void classifyAttribHTML(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler) {
bool wordIsNumber = isdigit(styler[start]) || (styler[start] == '.') ||
(styler[start] == '-') || (styler[start] == '#');
char chAttr = SCE_H_ATTRIBUTEUNKNOWN;
@@ -48,7 +48,7 @@ static void classifyAttribHTML(unsigned int start, unsigned int end, WordList &k
char s[100];
s[0] = '\0';
for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) {
- s[i] = tolower(styler[start + i]);
+ s[i] = static_cast<char>(tolower(styler[start + i]));
s[i + 1] = '\0';
}
if (keywords.InList(s))
@@ -58,14 +58,14 @@ static void classifyAttribHTML(unsigned int start, unsigned int end, WordList &k
}
static int classifyTagHTML(unsigned int start, unsigned int end,
- WordList &keywords, BufferAccess &styler) {
+ WordList &keywords, Accessor &styler) {
char s[100];
// Copy after the '<'
unsigned int i = 0;
for (unsigned int cPos=start; cPos <= end && i < 30; cPos++) {
char ch = styler[cPos];
if (ch != '<')
- s[i++] = tolower(ch);
+ s[i++] = static_cast<char>(tolower(ch));
}
s[i] = '\0';
char chAttr = SCE_H_TAGUNKNOWN;
@@ -86,7 +86,7 @@ static int classifyTagHTML(unsigned int start, unsigned int end,
}
static void classifyWordHTJS(unsigned int start, unsigned int end,
- WordList &keywords, BufferAccess &styler) {
+ WordList &keywords, Accessor &styler) {
char s[100];
bool wordIsNumber = isdigit(styler[start]) || (styler[start] == '.');
for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) {
@@ -104,7 +104,7 @@ static void classifyWordHTJS(unsigned int start, unsigned int end,
}
static void classifyWordHTJSA(unsigned int start, unsigned int end,
- WordList &keywords, BufferAccess &styler) {
+ WordList &keywords, Accessor &styler) {
char s[100];
bool wordIsNumber = isdigit(styler[start]) || (styler[start] == '.');
for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) {
@@ -121,11 +121,11 @@ static void classifyWordHTJSA(unsigned int start, unsigned int end,
styler.ColourTo(end, chAttr);
}
-static int classifyWordHTVB(unsigned int start, unsigned int end, WordList &keywords, BufferAccess &styler) {
+static int classifyWordHTVB(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler) {
char s[100];
bool wordIsNumber = isdigit(styler[start]) || (styler[start] == '.');
for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) {
- s[i] = tolower(styler[start + i]);
+ s[i] = static_cast<char>(tolower(styler[start + i]));
s[i + 1] = '\0';
}
char chAttr = SCE_HB_IDENTIFIER;
@@ -145,11 +145,11 @@ static int classifyWordHTVB(unsigned int start, unsigned int end, WordList &keyw
return SCE_HB_DEFAULT;
}
-static int classifyWordHTVBA(unsigned int start, unsigned int end, WordList &keywords, BufferAccess &styler) {
+static int classifyWordHTVBA(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler) {
char s[100];
bool wordIsNumber = isdigit(styler[start]) || (styler[start] == '.');
for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) {
- s[i] = tolower(styler[start + i]);
+ s[i] = static_cast<char>(tolower(styler[start + i]));
s[i + 1] = '\0';
}
char chAttr = SCE_HBA_IDENTIFIER;
@@ -169,7 +169,7 @@ static int classifyWordHTVBA(unsigned int start, unsigned int end, WordList &key
return SCE_HBA_DEFAULT;
}
-static void classifyWordHTPy(unsigned int start, unsigned int end, WordList &keywords, BufferAccess &styler, char *prevWord) {
+static void classifyWordHTPy(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler, char *prevWord) {
char s[100];
bool wordIsNumber = isdigit(styler[start]);
for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) {
@@ -189,7 +189,7 @@ static void classifyWordHTPy(unsigned int start, unsigned int end, WordList &key
strcpy(prevWord, s);
}
-static void classifyWordHTPyA(unsigned int start, unsigned int end, WordList &keywords, BufferAccess &styler, char *prevWord) {
+static void classifyWordHTPyA(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler, char *prevWord) {
char s[100];
bool wordIsNumber = isdigit(styler[start]);
for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) {
@@ -226,7 +226,7 @@ static bool isLineEnd(char ch) {
}
static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initStyle, WordList *keywordlists[],
- BufferAccess &styler) {
+ Accessor &styler) {
WordList &keywords=*keywordlists[0];
WordList &keywords2=*keywordlists[1];
diff --git a/src/LexOthers.cxx b/src/LexOthers.cxx
index abaf3ce75..a36e9a933 100644
--- a/src/LexOthers.cxx
+++ b/src/LexOthers.cxx
@@ -17,7 +17,7 @@
#include "Scintilla.h"
#include "SciLexer.h"
-static void ColouriseBatchLine(char *lineBuffer, int endLine, BufferAccess &styler) {
+static void ColouriseBatchLine(char *lineBuffer, int endLine, Accessor &styler) {
if (0 == strncmp(lineBuffer, "REM", 3)) {
styler.ColourTo(endLine, 1);
} else if (0 == strncmp(lineBuffer, "rem", 3)) {
@@ -33,7 +33,7 @@ static void ColouriseBatchLine(char *lineBuffer, int endLine, BufferAccess &styl
}
}
-static void ColouriseBatchDoc(unsigned int startPos, int length, int, WordList *[], BufferAccess &styler) {
+static void ColouriseBatchDoc(unsigned int startPos, int length, int, WordList *[], Accessor &styler) {
char lineBuffer[1024];
styler.StartAt(startPos);
styler.StartSegment(startPos);
@@ -49,7 +49,7 @@ static void ColouriseBatchDoc(unsigned int startPos, int length, int, WordList *
ColouriseBatchLine(lineBuffer, startPos + length, styler);
}
-static void ColourisePropsLine(char *lineBuffer, int lengthLine, int startLine, int endPos, BufferAccess &styler) {
+static void ColourisePropsLine(char *lineBuffer, int lengthLine, int startLine, int endPos, Accessor &styler) {
int i = 0;
while (isspace(lineBuffer[i]) && (i < lengthLine)) // Skip initial spaces
i++;
@@ -75,7 +75,7 @@ static void ColourisePropsLine(char *lineBuffer, int lengthLine, int startLine,
}
}
-static void ColourisePropsDoc(unsigned int startPos, int length, int, WordList *[], BufferAccess &styler) {
+static void ColourisePropsDoc(unsigned int startPos, int length, int, WordList *[], Accessor &styler) {
char lineBuffer[1024];
styler.StartAt(startPos);
styler.StartSegment(startPos);
@@ -96,7 +96,7 @@ static void ColourisePropsDoc(unsigned int startPos, int length, int, WordList *
ColourisePropsLine(lineBuffer, linePos, startLine, startPos + length, styler);
}
-static void ColouriseMakeLine(char *lineBuffer, int lengthLine, int endPos, BufferAccess &styler) {
+static void ColouriseMakeLine(char *lineBuffer, int lengthLine, int endPos, Accessor &styler) {
int i = 0;
while (isspace(lineBuffer[i]) && (i < lengthLine))
i++;
@@ -107,7 +107,7 @@ static void ColouriseMakeLine(char *lineBuffer, int lengthLine, int endPos, Buff
}
}
-static void ColouriseMakeDoc(unsigned int startPos, int length, int, WordList *[], BufferAccess &styler) {
+static void ColouriseMakeDoc(unsigned int startPos, int length, int, WordList *[], Accessor &styler) {
char lineBuffer[1024];
styler.StartAt(startPos);
styler.StartSegment(startPos);
@@ -123,7 +123,7 @@ static void ColouriseMakeDoc(unsigned int startPos, int length, int, WordList *[
ColouriseMakeLine(lineBuffer, linePos, startPos + length, styler);
}
-static void ColouriseErrorListLine(char *lineBuffer, int lengthLine, int endPos, BufferAccess &styler) {
+static void ColouriseErrorListLine(char *lineBuffer, int lengthLine, int endPos, Accessor &styler) {
if (lineBuffer[0] == '>') {
// Command or return status
styler.ColourTo(endPos, 4);
@@ -178,7 +178,7 @@ static void ColouriseErrorListLine(char *lineBuffer, int lengthLine, int endPos,
}
}
-static void ColouriseErrorListDoc(unsigned int startPos, int length, int, WordList *[], BufferAccess &styler) {
+static void ColouriseErrorListDoc(unsigned int startPos, int length, int, WordList *[], Accessor &styler) {
char lineBuffer[1024];
styler.StartAt(startPos);
styler.StartSegment(startPos);
diff --git a/src/LexPerl.cxx b/src/LexPerl.cxx
index c52aa8c4f..8fef7225e 100644
--- a/src/LexPerl.cxx
+++ b/src/LexPerl.cxx
@@ -31,7 +31,7 @@ inline bool isPerlOperator(char ch) {
return false;
}
-static int classifyWordPerl(unsigned int start, unsigned int end, WordList &keywords, BufferAccess &styler) {
+static int classifyWordPerl(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler) {
char s[100];
bool wordIsNumber = isdigit(styler[start]) || (styler[start] == '.');
for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) {
@@ -54,7 +54,7 @@ static bool isEndVar(char ch) {
ch != '_' && ch != '\'';
}
-static bool isMatch(BufferAccess &styler, int lengthDoc, int pos, const char *val) {
+static bool isMatch(Accessor &styler, int lengthDoc, int pos, const char *val) {
if ((pos + static_cast<int>(strlen(val))) >= lengthDoc) {
return false;
}
@@ -90,7 +90,7 @@ static char opposite(char ch) {
}
static void ColourisePerlDoc(unsigned int startPos, int length, int initStyle,
- WordList *keywordlists[], BufferAccess &styler) {
+ WordList *keywordlists[], Accessor &styler) {
// Lexer for perl often has to backtrack to start of current style to determine
// which characters are being used as quotes, how deeply nested is the
diff --git a/src/LexPython.cxx b/src/LexPython.cxx
index fcaa541ac..51d9791d9 100644
--- a/src/LexPython.cxx
+++ b/src/LexPython.cxx
@@ -17,7 +17,7 @@
#include "Scintilla.h"
#include "SciLexer.h"
-static void classifyWordPy(unsigned int start, unsigned int end, WordList &keywords, BufferAccess &styler, char *prevWord) {
+static void classifyWordPy(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler, char *prevWord) {
char s[100];
bool wordIsNumber = isdigit(styler[start]);
for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) {
@@ -37,12 +37,12 @@ static void classifyWordPy(unsigned int start, unsigned int end, WordList &keywo
strcpy(prevWord, s);
}
-static bool IsPyComment(BufferAccess &styler, int pos, int len) {
+static bool IsPyComment(Accessor &styler, int pos, int len) {
return len>0 && styler[pos]=='#';
}
static void ColourisePyDoc(unsigned int startPos, int length, int initStyle,
- WordList *keywordlists[], BufferAccess &styler) {
+ WordList *keywordlists[], Accessor &styler) {
// Python uses a different mask because bad indentation is marked by oring with 32
styler.StartAt(startPos, 127);
@@ -71,15 +71,19 @@ static void ColourisePyDoc(unsigned int startPos, int length, int initStyle,
for (int i = startPos; i <= lengthDoc; i++) {
if (atStartLine) {
+ char chFlags;
+ char chBad = static_cast<char>(64);
+ char chGood = static_cast<char>(0);
if (whingeLevel == 1) {
- styler.SetFlags((spaceFlags & wsInconsistent) ? 64 : 0, state);
+ chFlags = (spaceFlags & wsInconsistent) ? chBad : chGood;
} else if (whingeLevel == 2) {
- styler.SetFlags((spaceFlags & wsSpaceTab) ? 64 : 0, state);
+ chFlags = (spaceFlags & wsSpaceTab) ? chBad : chGood;
} else if (whingeLevel == 3) {
- styler.SetFlags((spaceFlags & wsSpace) ? 64 : 0, state);
+ chFlags = (spaceFlags & wsSpace) ? chBad : chGood;
} else if (whingeLevel == 4) {
- styler.SetFlags((spaceFlags & wsTab) ? 64 : 0, state);
+ chFlags = (spaceFlags & wsTab) ? chBad : chGood;
}
+ styler.SetFlags(chFlags, static_cast<char>(state));
atStartLine = false;
}
diff --git a/src/LexSQL.cxx b/src/LexSQL.cxx
index 6433776ca..eb8464a56 100644
--- a/src/LexSQL.cxx
+++ b/src/LexSQL.cxx
@@ -17,11 +17,11 @@
#include "Scintilla.h"
#include "SciLexer.h"
-static void classifyWordSQL(unsigned int start, unsigned int end, WordList &keywords, BufferAccess &styler) {
+static void classifyWordSQL(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler) {
char s[100];
bool wordIsNumber = isdigit(styler[start]) || (styler[start] == '.');
for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) {
- s[i] = toupper(styler[start + i]);
+ s[i] = static_cast<char>(toupper(styler[start + i]));
s[i + 1] = '\0';
}
char chAttr = SCE_C_IDENTIFIER;
@@ -35,7 +35,7 @@ static void classifyWordSQL(unsigned int start, unsigned int end, WordList &keyw
}
static void ColouriseSQLDoc(unsigned int startPos, int length,
- int initStyle, WordList *keywordlists[], BufferAccess &styler) {
+ int initStyle, WordList *keywordlists[], Accessor &styler) {
WordList &keywords = *keywordlists[0];
diff --git a/src/LexVB.cxx b/src/LexVB.cxx
index 2b2154f21..9f372c59f 100644
--- a/src/LexVB.cxx
+++ b/src/LexVB.cxx
@@ -17,12 +17,12 @@
#include "Scintilla.h"
#include "SciLexer.h"
-static int classifyWordVB(unsigned int start, unsigned int end, WordList &keywords, BufferAccess &styler) {
+static int classifyWordVB(unsigned int start, unsigned int end, WordList &keywords, Accessor &styler) {
char s[100];
bool wordIsNumber = isdigit(styler[start]) || (styler[start] == '.');
for (unsigned int i = 0; i < end - start + 1 && i < 30; i++) {
- s[i] = tolower(styler[start + i]);
+ s[i] = static_cast<char>(tolower(styler[start + i]));
s[i + 1] = '\0';
}
char chAttr = SCE_C_DEFAULT;
@@ -43,7 +43,7 @@ static int classifyWordVB(unsigned int start, unsigned int end, WordList &keywor
}
static void ColouriseVBDoc(unsigned int startPos, int length, int initStyle,
- WordList *keywordlists[], BufferAccess &styler) {
+ WordList *keywordlists[], Accessor &styler) {
WordList &keywords = *keywordlists[0];
diff --git a/src/ScintillaBase.cxx b/src/ScintillaBase.cxx
index 76177f242..ce8883bc3 100644
--- a/src/ScintillaBase.cxx
+++ b/src/ScintillaBase.cxx
@@ -291,7 +291,7 @@ void ScintillaBase::Colourise(int start, int end) {
}
#endif
-void ScintillaBase::NotifyStyleNeeded(int endStyleNeeded) {
+void ScintillaBase::NotifyStyleToNeeded(int endStyleNeeded) {
#ifdef SCI_LEXER
if (lexLanguage != SCLEX_CONTAINER) {
int endStyled = Platform::SendScintilla(wMain.GetID(), SCI_GETENDSTYLED, 0, 0);
@@ -301,7 +301,7 @@ void ScintillaBase::NotifyStyleNeeded(int endStyleNeeded) {
return;
}
#endif
- Editor::NotifyStyleNeeded(endStyleNeeded);
+ Editor::NotifyStyleToNeeded(endStyleNeeded);
}
LRESULT ScintillaBase::WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam) {
diff --git a/src/ScintillaBase.h b/src/ScintillaBase.h
index e9f8f28d0..ec1b0665b 100644
--- a/src/ScintillaBase.h
+++ b/src/ScintillaBase.h
@@ -59,7 +59,7 @@ protected:
virtual void ButtonDown(Point pt, unsigned int curTime, bool shift, bool ctrl, bool alt);
- virtual void NotifyStyleNeeded(int endStyleNeeded);
+ virtual void NotifyStyleToNeeded(int endStyleNeeded);
public:
// Public so scintilla_send_message can use it
virtual LRESULT WndProc(UINT iMessage, WPARAM wParam, LPARAM lParam);