Skip to content

Commit 858d771

Browse files
author
L'In20Cible
committed
Fixed indent of DataMapSharedExt::find
1 parent be442a6 commit 858d771

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

src/core/modules/entities/entities_datamaps.cpp

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -108,30 +108,30 @@ typedescription_t& DataMapSharedExt::__getitem__(const datamap_t& pDataMap, int
108108
}
109109

110110
typedescription_t* DataMapSharedExt::find(datamap_t* pDataMap, const char *szName)
111+
{
112+
while (pDataMap)
111113
{
112-
while (pDataMap)
114+
for (int iCurrentIndex=0; iCurrentIndex < pDataMap->dataNumFields; iCurrentIndex++)
113115
{
114-
for (int iCurrentIndex=0; iCurrentIndex < pDataMap->dataNumFields; iCurrentIndex++)
116+
typedescription_t& pCurrentDataDesc = pDataMap->dataDesc[iCurrentIndex];
117+
if ((pCurrentDataDesc.fieldName && strcmp(szName, pCurrentDataDesc.fieldName) == 0) ||
118+
(pCurrentDataDesc.externalName && strcmp(szName, pCurrentDataDesc.externalName) == 0))
115119
{
116-
typedescription_t& pCurrentDataDesc = pDataMap->dataDesc[iCurrentIndex];
117-
if ((pCurrentDataDesc.fieldName && strcmp(szName, pCurrentDataDesc.fieldName) == 0) ||
118-
(pCurrentDataDesc.externalName && strcmp(szName, pCurrentDataDesc.externalName) == 0))
119-
{
120-
return &(pDataMap->dataDesc[iCurrentIndex]);
121-
}
122-
else if (pCurrentDataDesc.fieldType == FIELD_EMBEDDED)
120+
return &(pDataMap->dataDesc[iCurrentIndex]);
121+
}
122+
else if (pCurrentDataDesc.fieldType == FIELD_EMBEDDED)
123+
{
124+
typedescription_t *pReturnValue = find(pCurrentDataDesc.td, szName);
125+
if (pReturnValue)
123126
{
124-
typedescription_t *pReturnValue = find(pCurrentDataDesc.td, szName);
125-
if (pReturnValue)
126-
{
127-
return pReturnValue;
128-
}
127+
return pReturnValue;
129128
}
130129
}
131-
pDataMap = pDataMap->baseMap;
132130
}
133-
return NULL;
131+
pDataMap = pDataMap->baseMap;
134132
}
133+
return NULL;
134+
}
135135

136136
int DataMapSharedExt::find_offset(datamap_t* pDataMap, const char* name)
137137
{

0 commit comments

Comments
 (0)