Core/DataStores: Simplified string memory allocation in db2 files, dropped unneccessary level of indirection

This commit is contained in:
Shauren
2020-06-27 13:33:17 +02:00
parent eccc015ce7
commit deca201f77
38 changed files with 333 additions and 380 deletions

View File

@@ -16,6 +16,7 @@
*/
#include "DB2Meta.h"
#include "Common.h"
#include "Errors.h"
DB2MetaField::DB2MetaField(DBCFormer type, uint8 arraySize, bool isSigned) : Type(type), ArraySize(arraySize), IsSigned(isSigned)
@@ -66,6 +67,8 @@ uint32 DB2Meta::GetRecordSize() const
size += 8;
break;
case FT_STRING:
size += sizeof(LocalizedString);
break;
case FT_STRING_NOT_LOCALIZED:
size += sizeof(char*);
break;
@@ -115,6 +118,8 @@ uint32 DB2Meta::GetIndexFieldOffset() const
offset += 8;
break;
case FT_STRING:
offset += sizeof(LocalizedString);
break;
case FT_STRING_NOT_LOCALIZED:
offset += sizeof(char*);
break;
@@ -157,6 +162,8 @@ int32 DB2Meta::GetParentIndexFieldOffset() const
offset += 8;
break;
case FT_STRING:
offset += sizeof(LocalizedString);
break;
case FT_STRING_NOT_LOCALIZED:
offset += sizeof(char*);
break;