mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 14:03:07 +01:00
Style.
This commit is contained in:
parent
57af12867e
commit
2b13bcfa2a
@ -274,7 +274,8 @@ public:
|
||||
// Resize array according to STL's vector::resize() rules
|
||||
void resize(const size_t newCount, const T& val)
|
||||
{
|
||||
if (newCount > count) {
|
||||
if (newCount > count)
|
||||
{
|
||||
ensureCapacity(newCount);
|
||||
while (count < newCount) {
|
||||
data[count++] = val;
|
||||
@ -358,8 +359,10 @@ public:
|
||||
// Maybe we should modify it to iterate directy with "pos".
|
||||
bool find(const T& item, size_t& pos) const
|
||||
{
|
||||
for (size_t i = 0; i < count; i++) {
|
||||
if (data[i] == item) {
|
||||
for (size_t i = 0; i < count; i++)
|
||||
{
|
||||
if (data[i] == item)
|
||||
{
|
||||
pos = i;
|
||||
return true;
|
||||
}
|
||||
@ -391,7 +394,8 @@ protected:
|
||||
|
||||
void ensureCapacity(size_t newcapacity, bool preserve = true)
|
||||
{
|
||||
if (newcapacity > capacity) {
|
||||
if (newcapacity > capacity)
|
||||
{
|
||||
if (newcapacity < capacity * 2) {
|
||||
newcapacity = capacity * 2;
|
||||
}
|
||||
@ -429,7 +433,8 @@ public:
|
||||
bool find(const Key& item, size_t& pos) const
|
||||
{
|
||||
size_t highBound = this->count, lowBound = 0;
|
||||
while (highBound > lowBound) {
|
||||
while (highBound > lowBound)
|
||||
{
|
||||
const size_t temp = (highBound + lowBound) >> 1;
|
||||
if (Cmp::greaterThan(item, KeyOfValue::generate(this, this->data[temp])))
|
||||
lowBound = temp + 1;
|
||||
|
Loading…
Reference in New Issue
Block a user