diff options
author | nyamatongwe <unknown> | 2011-04-22 10:14:46 +1000 |
---|---|---|
committer | nyamatongwe <unknown> | 2011-04-22 10:14:46 +1000 |
commit | 767f9599d778753f24286bf063aee1bb6d2612d7 (patch) | |
tree | 2b99aa914ee473d7885c4b695c4c3ca31bf4d64a | |
parent | 138a30cbbb39eb8d3c3588532b20c0026a8e76ca (diff) | |
download | scintilla-mirror-767f9599d778753f24286bf063aee1bb6d2612d7.tar.gz |
Simplify code and avoid warnings.
-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(); |