mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2024-11-08 08:47:17 +01:00
Indentation fix for previous commit.
This commit is contained in:
parent
15532298dc
commit
48c72e3cfb
@ -2665,13 +2665,13 @@ Array ResultSet::FetchFieldsArray(Array & fields) const
|
|||||||
Field field(m_Handle);
|
Field field(m_Handle);
|
||||||
// Allocate an array with the same amount of elements as the number of fields
|
// Allocate an array with the same amount of elements as the number of fields
|
||||||
Array arr(DefaultVM::Get(), fields.Length());
|
Array arr(DefaultVM::Get(), fields.Length());
|
||||||
// Iterate the specified fields array
|
// Iterate the specified fields array
|
||||||
fields.Foreach([&field, &arr](HSQUIRRELVM vm, SQInteger i) -> SQRESULT {
|
fields.Foreach([&field, &arr](HSQUIRRELVM vm, SQInteger i) -> SQRESULT {
|
||||||
// Update the field index
|
// Update the field index
|
||||||
field.SetIndex(Object(-1, vm));
|
field.SetIndex(Object(-1, vm));
|
||||||
// Insert a copy of the field instance into the array
|
// Insert a copy of the field instance into the array
|
||||||
arr.SetValue(i, field);
|
arr.SetValue(i, field);
|
||||||
});
|
});
|
||||||
// Return the resulted array
|
// Return the resulted array
|
||||||
return arr;
|
return arr;
|
||||||
}
|
}
|
||||||
@ -2720,13 +2720,13 @@ Table ResultSet::FetchFieldsTable(Array & fields) const
|
|||||||
Table tbl(DefaultVM::Get(), fields.Length());
|
Table tbl(DefaultVM::Get(), fields.Length());
|
||||||
// Grab the array with field instances
|
// Grab the array with field instances
|
||||||
const ResHnd::FieldType * pfields = m_Handle->mFields;
|
const ResHnd::FieldType * pfields = m_Handle->mFields;
|
||||||
// Iterate the specified fields array
|
// Iterate the specified fields array
|
||||||
fields.Foreach([&field, &tbl, pfields](HSQUIRRELVM vm, SQInteger i) -> SQRESULT {
|
fields.Foreach([&field, &tbl, pfields](HSQUIRRELVM vm, SQInteger i) -> SQRESULT {
|
||||||
// Update the field index
|
// Update the field index
|
||||||
field.SetIndex(Object(-1, vm));
|
field.SetIndex(Object(-1, vm));
|
||||||
// Insert a copy of the field instance into the table
|
// Insert a copy of the field instance into the table
|
||||||
tbl.SetValue((pfields[field.GetIndex()].name == nullptr) ? ToStrF("<field_%ld>", field.GetIndex()) : pfields[field.GetIndex()].name, field);
|
tbl.SetValue((pfields[field.GetIndex()].name == nullptr) ? ToStrF("<field_%ld>", field.GetIndex()) : pfields[field.GetIndex()].name, field);
|
||||||
});
|
});
|
||||||
// Return the resulted array
|
// Return the resulted array
|
||||||
return tbl;
|
return tbl;
|
||||||
}
|
}
|
||||||
|
@ -545,17 +545,17 @@ public:
|
|||||||
const StackGuard sg(vm);
|
const StackGuard sg(vm);
|
||||||
sq_pushobject(vm,obj);
|
sq_pushobject(vm,obj);
|
||||||
sq_pushnull(vm);
|
sq_pushnull(vm);
|
||||||
SQRESULT res = SQ_OK;
|
SQRESULT res = SQ_OK;
|
||||||
for(SQInteger i = 0; SQ_SUCCEEDED(sq_next(vm,-2)); ++i)
|
for(SQInteger i = 0; SQ_SUCCEEDED(sq_next(vm,-2)); ++i)
|
||||||
{
|
{
|
||||||
res = func(vm, i);
|
res = func(vm, i);
|
||||||
if (SQ_FAILED(res))
|
if (SQ_FAILED(res))
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
sq_pop(vm,2);
|
sq_pop(vm,2);
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
Loading…
Reference in New Issue
Block a user