diff options
| author | nyamatongwe <unknown> | 2011-01-02 09:56:17 +1100 | 
|---|---|---|
| committer | nyamatongwe <unknown> | 2011-01-02 09:56:17 +1100 | 
| commit | 2be32592356710eda9419a86da5d85e36a1c8cda (patch) | |
| tree | 12631ad89c221a618cae930ae77ae4987f123217 | |
| parent | d02d58bee77d11650c5166e4d01172e0d2c0a130 (diff) | |
| download | scintilla-mirror-2be32592356710eda9419a86da5d85e36a1c8cda.tar.gz | |
Avoid cppcheck warnings.
| -rw-r--r-- | src/CallTip.cxx | 3 | ||||
| -rw-r--r-- | src/ExternalLexer.cxx | 1 | ||||
| -rw-r--r-- | src/ExternalLexer.h | 5 | ||||
| -rw-r--r-- | src/PositionCache.cxx | 2 | ||||
| -rw-r--r-- | src/Selection.h | 4 | 
5 files changed, 10 insertions, 5 deletions
| diff --git a/src/CallTip.cxx b/src/CallTip.cxx index 18a524752..604304bf8 100644 --- a/src/CallTip.cxx +++ b/src/CallTip.cxx @@ -29,6 +29,7 @@ CallTip::CallTip() {  	rectUp = PRectangle(0,0,0,0);  	rectDown = PRectangle(0,0,0,0);  	lineHeight = 1; +	offsetMain = 0;  	startHighlight = 0;  	endHighlight = 0;  	tabSize = 0; @@ -45,6 +46,8 @@ CallTip::CallTip() {  	colourSel.desired = ColourDesired(0, 0, 0x80);  	colourShade.desired = ColourDesired(0, 0, 0);  	colourLight.desired = ColourDesired(0xc0, 0xc0, 0xc0); +	codePage = 0; +	clickPlace = 0;  }  CallTip::~CallTip() { diff --git a/src/ExternalLexer.cxx b/src/ExternalLexer.cxx index 02b7eaa8d..bb4846497 100644 --- a/src/ExternalLexer.cxx +++ b/src/ExternalLexer.cxx @@ -38,7 +38,6 @@ LexerManager *LexerManager::theInstance = NULL;  void ExternalLexerModule::SetExternal(GetLexerFactoryFunction fFactory, int index) {  	fneFactory = fFactory;  	fnFactory = fFactory(index); -	externalLanguage = index;  }  //------------------------------------------ diff --git a/src/ExternalLexer.h b/src/ExternalLexer.h index 98d543ef1..bf175a631 100644 --- a/src/ExternalLexer.h +++ b/src/ExternalLexer.h @@ -27,11 +27,12 @@ typedef LexerFactoryFunction(EXT_LEXER_DECL *GetLexerFactoryFunction)(unsigned i  class ExternalLexerModule : public LexerModule {  protected:  	GetLexerFactoryFunction fneFactory; -	int externalLanguage;  	char name[100];  public:  	ExternalLexerModule(int language_, LexerFunction fnLexer_, -		const char *languageName_=0, LexerFunction fnFolder_=0) : LexerModule(language_, fnLexer_, 0, fnFolder_) { +		const char *languageName_=0, LexerFunction fnFolder_=0) : +		LexerModule(language_, fnLexer_, 0, fnFolder_), +		fneFactory(0) {  		strncpy(name, languageName_, sizeof(name));  		name[sizeof(name)-1] = '\0';  		languageName = name; diff --git a/src/PositionCache.cxx b/src/PositionCache.cxx index 548b4d940..2ed152455 100644 --- a/src/PositionCache.cxx +++ b/src/PositionCache.cxx @@ -68,6 +68,8 @@ LineLayout::LineLayout(int maxLineLength_) :  	widthLine(wrapWidthInfinite),  	lines(1),  	wrapIndent(0) { +	bracePreviousStyles[0] = 0; +	bracePreviousStyles[1] = 0;  	Resize(maxLineLength_);  } diff --git a/src/Selection.h b/src/Selection.h index 75f02f6cd..d7c7d79ad 100644 --- a/src/Selection.h +++ b/src/Selection.h @@ -60,7 +60,7 @@ public:  struct SelectionSegment {  	SelectionPosition start;  	SelectionPosition end; -	SelectionSegment() { +	SelectionSegment() : start(), end() {  	}  	SelectionSegment(SelectionPosition a, SelectionPosition b) {  		if (a < b) { @@ -86,7 +86,7 @@ struct SelectionRange {  	SelectionPosition caret;  	SelectionPosition anchor; -	SelectionRange() { +	SelectionRange() : caret(), anchor() {  	}  	SelectionRange(SelectionPosition single) : caret(single), anchor(single) {  	} | 
