aboutsummaryrefslogtreecommitdiffhomepage
path: root/lexlib
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2013-12-15 12:49:06 +1100
committerNeil <nyamatongwe@gmail.com>2013-12-15 12:49:06 +1100
commitb4c46f78da230ff3077bc2b96ac66f5ac017c7a2 (patch)
tree3a06d1dc7b2deb5e25d5e148666f086fb0864ff4 /lexlib
parent982a9be5d39fb042e1deb86af5930cb54729f83f (diff)
downloadscintilla-mirror-b4c46f78da230ff3077bc2b96ac66f5ac017c7a2.tar.gz
Make single argument constructors explicit to avoid unexpected conversions.
Diffstat (limited to 'lexlib')
-rw-r--r--lexlib/LexAccessor.h2
-rw-r--r--lexlib/LexerSimple.h2
-rw-r--r--lexlib/SparseState.h2
-rw-r--r--lexlib/SubStyles.h2
-rw-r--r--lexlib/WordList.h2
5 files changed, 5 insertions, 5 deletions
diff --git a/lexlib/LexAccessor.h b/lexlib/LexAccessor.h
index 59e73cf6e..45a3a0a93 100644
--- a/lexlib/LexAccessor.h
+++ b/lexlib/LexAccessor.h
@@ -53,7 +53,7 @@ private:
}
public:
- LexAccessor(IDocument *pAccess_) :
+ explicit LexAccessor(IDocument *pAccess_) :
pAccess(pAccess_), startPos(extremePosition), endPos(0),
codePage(pAccess->CodePage()),
encodingType(enc8bit),
diff --git a/lexlib/LexerSimple.h b/lexlib/LexerSimple.h
index 89631936f..e9fa9003f 100644
--- a/lexlib/LexerSimple.h
+++ b/lexlib/LexerSimple.h
@@ -17,7 +17,7 @@ class LexerSimple : public LexerBase {
const LexerModule *module;
std::string wordLists;
public:
- LexerSimple(const LexerModule *module_);
+ explicit LexerSimple(const LexerModule *module_);
const char * SCI_METHOD DescribeWordListSets();
void SCI_METHOD Lex(unsigned int startPos, int lengthDoc, int initStyle, IDocument *pAccess);
void SCI_METHOD Fold(unsigned int startPos, int lengthDoc, int initStyle, IDocument *pAccess);
diff --git a/lexlib/SparseState.h b/lexlib/SparseState.h
index 08ff104d3..e767d6710 100644
--- a/lexlib/SparseState.h
+++ b/lexlib/SparseState.h
@@ -38,7 +38,7 @@ class SparseState {
}
public:
- SparseState(int positionFirst_=-1) {
+ explicit SparseState(int positionFirst_=-1) {
positionFirst = positionFirst_;
}
void Set(int position, T value) {
diff --git a/lexlib/SubStyles.h b/lexlib/SubStyles.h
index 961715c3c..579107819 100644
--- a/lexlib/SubStyles.h
+++ b/lexlib/SubStyles.h
@@ -20,7 +20,7 @@ class WordClassifier {
public:
- WordClassifier(int baseStyle_) : baseStyle(baseStyle_), firstStyle(0), lenStyles(0) {
+ explicit WordClassifier(int baseStyle_) : baseStyle(baseStyle_), firstStyle(0), lenStyles(0) {
}
void Allocate(int firstStyle_, int lenStyles_) {
diff --git a/lexlib/WordList.h b/lexlib/WordList.h
index 9c8285ece..382be2812 100644
--- a/lexlib/WordList.h
+++ b/lexlib/WordList.h
@@ -22,7 +22,7 @@ class WordList {
bool onlyLineEnds; ///< Delimited by any white space or only line ends
int starts[256];
public:
- WordList(bool onlyLineEnds_ = false);
+ explicit WordList(bool onlyLineEnds_ = false);
~WordList();
operator bool() const;
bool operator!=(const WordList &other) const;