1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
|
# HG changeset patch
# User Neil <nyamatongwe@gmail.com>
# Date 1492230489 -36000
# Node ID 692a54eaa6049d6ea3459f66c001ef0c8ea7668f
# Parent 3e2dd597007504f8745a3fed53ccba9bbe611265
Use bool literals true and false instead of 1 and 0.
diff -r 3e2dd5970075 -r 692a54eaa604 lexers/LexHTML.cxx
--- a/lexers/LexHTML.cxx Fri Apr 14 13:06:45 2017 +1000
+++ b/lexers/LexHTML.cxx Sat Apr 15 14:28:09 2017 +1000
@@ -490,9 +490,9 @@
return ((ch == '/') && (chNext == '>'));
} else if (0 == strcmp(blockType, "%")) {
if (ch == '/' && isLineEnd(chNext))
- return 1;
+ return true;
else
- return isLineEnd(ch);
+ return isLineEnd(ch);
} else if (0 == strcmp(blockType, "{")) {
return ch == '}';
} else {
@@ -502,13 +502,13 @@
static bool isDjangoBlockEnd(const int ch, const int chNext, const char *blockType) {
if (strlen(blockType) == 0) {
- return 0;
+ return false;
} else if (0 == strcmp(blockType, "%")) {
return ((ch == '%') && (chNext == '}'));
} else if (0 == strcmp(blockType, "{")) {
return ((ch == '}') && (chNext == '}'));
} else {
- return 0;
+ return false;
}
}
diff -r 3e2dd5970075 -r 692a54eaa604 src/Editor.cxx
--- a/src/Editor.cxx Fri Apr 14 13:06:45 2017 +1000
+++ b/src/Editor.cxx Sat Apr 15 14:28:09 2017 +1000
@@ -5331,7 +5331,7 @@
if (action == SC_FOLDACTION_CONTRACT) {
const Sci::Line lineMaxSubord = pdoc->GetLastChild(line);
if (lineMaxSubord > line) {
- cs.SetExpanded(line, 0);
+ cs.SetExpanded(line, false);
cs.SetVisible(line + 1, lineMaxSubord, false);
const Sci::Line lineCurrent = pdoc->LineFromPosition(sel.MainCaret());
@@ -5346,7 +5346,7 @@
EnsureLineVisible(line, false);
GoToLine(line);
}
- cs.SetExpanded(line, 1);
+ cs.SetExpanded(line, true);
ExpandLine(line);
}
@@ -5419,7 +5419,7 @@
if (lineDoc != lineParent)
EnsureLineVisible(lineParent, enforcePolicy);
if (!cs.GetExpanded(lineParent)) {
- cs.SetExpanded(lineParent, 1);
+ cs.SetExpanded(lineParent, true);
ExpandLine(lineParent);
}
}
diff -r 3e2dd5970075 -r 692a54eaa604 src/PerLine.cxx
--- a/src/PerLine.cxx Fri Apr 14 13:06:45 2017 +1000
+++ b/src/PerLine.cxx Sat Apr 15 14:28:09 2017 +1000
@@ -385,7 +385,7 @@
if (annotations.Length() && (line >= 0) && (line < annotations.Length()) && annotations[line])
return reinterpret_cast<AnnotationHeader *>(annotations[line])->style == IndividualStyles;
else
- return 0;
+ return false;
}
int LineAnnotation::Style(Sci::Line line) const {
diff -r 3e2dd5970075 -r 692a54eaa604 src/PositionCache.cxx
--- a/src/PositionCache.cxx Fri Apr 14 13:06:45 2017 +1000
+++ b/src/PositionCache.cxx Sat Apr 15 14:28:09 2017 +1000
@@ -55,7 +55,7 @@
numCharsBeforeEOL(0),
validity(llInvalid),
xHighlightGuide(0),
- highlightColumn(0),
+ highlightColumn(false),
containsCaret(false),
edgeColumn(0),
chars(0),
|