Skip to content

Commit

Permalink
Simplifying code in MMAddFeatureRecordToMMDB()
Browse files Browse the repository at this point in the history
  • Loading branch information
AbelPau committed Apr 3, 2024
1 parent 69cd1ec commit e117d15
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions ogr/ogrsf_frmts/miramon/mm_wrlayr.c
Original file line number Diff line number Diff line change
Expand Up @@ -6553,18 +6553,13 @@ static int MMAddFeatureRecordToMMDB(struct MiraMonVectLayerInfo *hMiraMonLayer,
// A field with no valid value is written as blank
if (!hMMFeature->pRecords[nIRecord].pField[nIField].bIsValid)
{
MM_ACUMULATED_BYTES_TYPE_DBF i = 0;
while (
i <
pBD_XP->pField[nIField + nNumPrivateMMField].BytesPerField)
{
memcpy(pszRecordOnCourse +
pBD_XP->pField[nIField + nNumPrivateMMField]
.AcumulatedBytes +
i,
" ", 1);
i++;
}
memset(
pszRecordOnCourse +
pBD_XP->pField[nIField + nNumPrivateMMField]
.AcumulatedBytes,
' ',
pBD_XP->pField[nIField + nNumPrivateMMField].BytesPerField);

continue;
}
if (pBD_XP->pField[nIField + nNumPrivateMMField].FieldType == 'C')
Expand Down

0 comments on commit e117d15

Please sign in to comment.