aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2011-02-20 08:43:25 +1100
committernyamatongwe <devnull@localhost>2011-02-20 08:43:25 +1100
commitc599749164ede08d1e68dbb857135eb75abb1f25 (patch)
tree20038032b7afcf721b95efc8d01619b12206acd8
parent63d64405ee7c55959b393cfc5afa5eb13f65d95a (diff)
downloadscintilla-mirror-c599749164ede08d1e68dbb857135eb75abb1f25.tar.gz
Avoid some cppcheck warnings.
-rw-r--r--include/Platform.h8
-rw-r--r--lexlib/SparseState.h4
-rw-r--r--src/AutoComplete.cxx2
3 files changed, 7 insertions, 7 deletions
diff --git a/include/Platform.h b/include/Platform.h
index ea9f97298..b70ffc3ce 100644
--- a/include/Platform.h
+++ b/include/Platform.h
@@ -255,8 +255,8 @@ class Palette {
int allocatedLen;
#endif
// Private so Palette objects can not be copied
- Palette(const Palette &) {}
- Palette &operator=(const Palette &) { return *this; }
+ Palette(const Palette &);
+ Palette &operator=(const Palette &);
public:
#if PLAT_WIN
void *hpal;
@@ -288,8 +288,8 @@ protected:
int ascent;
#endif
// Private so Font objects can not be copied
- Font(const Font &) {}
- Font &operator=(const Font &) { fid=0; return *this; }
+ Font(const Font &);
+ Font &operator=(const Font &);
public:
Font();
virtual ~Font();
diff --git a/lexlib/SparseState.h b/lexlib/SparseState.h
index bd74ecef2..94aa929ef 100644
--- a/lexlib/SparseState.h
+++ b/lexlib/SparseState.h
@@ -57,7 +57,7 @@ public:
return states[states.size()-1].value;
} else {
if (low->position > position) {
- low--;
+ --low;
}
return low->value;
}
@@ -93,7 +93,7 @@ public:
}
typename stateVector::const_iterator startOther = other.states.begin();
if (!states.empty() && states.back().value == startOther->value)
- startOther++;
+ ++startOther;
if (startOther != other.states.end()) {
states.insert(states.end(), startOther, other.states.end());
changed = true;
diff --git a/src/AutoComplete.cxx b/src/AutoComplete.cxx
index 32cf7b2ed..f6a291fe9 100644
--- a/src/AutoComplete.cxx
+++ b/src/AutoComplete.cxx
@@ -129,11 +129,11 @@ void AutoComplete::Select(const char *word) {
size_t lenWord = strlen(word);
int location = -1;
const int maxItemLen=1000;
- char item[maxItemLen];
int start = 0; // lower bound of the api array block to search
int end = lb->Length() - 1; // upper bound of the api array block to search
while ((start <= end) && (location == -1)) { // Binary searching loop
int pivot = (start + end) / 2;
+ char item[maxItemLen];
lb->GetValue(pivot, item, maxItemLen);
int cond;
if (ignoreCase)