diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2018-01-09 11:57:16 +0100 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2018-01-09 11:57:16 +0100 |
commit | e079b5959782fb7f9993e05b81970010d9beb136 (patch) | |
tree | 269c2bc201fe356b05fd6232d6dd299d168c8ff1 /vespalib | |
parent | b4cd09c8fcd0a018580a99cf9a2b07a64312b00a (diff) |
Rewrite for to while for readability.
Diffstat (limited to 'vespalib')
-rw-r--r-- | vespalib/src/vespa/vespalib/stllike/hashtable.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/vespalib/src/vespa/vespalib/stllike/hashtable.h b/vespalib/src/vespa/vespalib/stllike/hashtable.h index 6e3c753836e..6acbfb82c0d 100644 --- a/vespalib/src/vespa/vespalib/stllike/hashtable.h +++ b/vespalib/src/vespa/vespalib/stllike/hashtable.h @@ -167,7 +167,10 @@ public: void setInternalIndex(next_t n) { _current = n; } private: void advanceToNextValidHash() { - for (_current++;(_current < _hashTable->initializedSize()) && ! _hashTable->_nodes[_current].valid(); _current++) { } + ++_current; + while ((_current < _hashTable->initializedSize()) && ! _hashTable->_nodes[_current].valid()) { + ++_current; + } } next_t _current; hashtable * _hashTable; @@ -207,7 +210,10 @@ public: next_t getInternalIndex() const { return _current; } private: void advanceToNextValidHash() { - for (_current++;(_current < _hashTable->initializedSize()) && ! _hashTable->_nodes[_current].valid(); _current++) { } + ++_current; + while ((_current < _hashTable->initializedSize()) && ! _hashTable->_nodes[_current].valid()) { + ++_current; + } } next_t _current; const hashtable * _hashTable; |