diff options
author | nyamatongwe <devnull@localhost> | 2011-04-22 10:14:46 +1000 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2011-04-22 10:14:46 +1000 |
commit | 60ddd45e4dcb11c92d9f2cece40252f6232fc9b1 (patch) | |
tree | 860c980509a9a70e21231f5cc4599157afb8eb36 /lexlib/SparseState.h | |
parent | 60a39b1f645752549bddc6b7026e6ff44ac95433 (diff) | |
download | scintilla-mirror-60ddd45e4dcb11c92d9f2cece40252f6232fc9b1.tar.gz |
Simplify code and avoid warnings.
Diffstat (limited to 'lexlib/SparseState.h')
-rw-r--r-- | lexlib/SparseState.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lexlib/SparseState.h b/lexlib/SparseState.h index 94aa929ef..655d7429c 100644 --- a/lexlib/SparseState.h +++ b/lexlib/SparseState.h @@ -43,12 +43,12 @@ public: } void Set(int position, T value) { Delete(position); - if ((states.size() == 0) || (value != states[states.size()-1].value)) { + if (states.empty() || (value != states[states.size()-1].value)) { states.push_back(State(position, value)); } } T ValueAt(int position) { - if (!states.size()) + if (states.empty()) return T(); if (position < states[0].position) return T(); |