Clean up the code a bit

refs #4991
This commit is contained in:
Gunnar Beutner 2017-03-20 10:31:05 +01:00 committed by Michael Friedrich
parent 0c25d14d0c
commit 2d9be77260
2 changed files with 2 additions and 8 deletions

View File

@ -77,15 +77,9 @@ Dictionary::Ptr RedisWriter::SerializeObjectAttrs(const Object::Ptr& object, int
{
Type::Ptr type = object->GetReflectionType();
std::vector<int> fids;
for (int fid = 0; fid < type->GetFieldCount(); fid++) {
fids.push_back(fid);
}
Dictionary::Ptr resultAttrs = new Dictionary();
for (int& fid : fids) {
for (int fid = 0; fid < type->GetFieldCount(); fid++) {
Field field = type->GetFieldInfo(fid);
if ((field.Attributes & fieldType) == 0)

View File

@ -83,7 +83,7 @@ Dictionary::Ptr ObjectQueryHandler::SerializeObjectAttrs(const Object::Ptr& obje
Dictionary::Ptr resultAttrs = new Dictionary();
for (int& fid : fids)
for (int fid : fids)
{
Field field = type->GetFieldInfo(fid);