mirror of
https://github.com/mangosfour/server.git
synced 2025-12-25 13:37:02 +00:00
Cleanup Operator padding
This commit is contained in:
parent
9141299127
commit
e32b9953a1
264 changed files with 6715 additions and 6715 deletions
|
|
@ -24,17 +24,17 @@
|
|||
|
||||
enum
|
||||
{
|
||||
FT_NA='x', // ignore/ default, 4 byte size, in Source String means field is ignored, in Dest String means field is filled with default value
|
||||
FT_NA_BYTE='X', // ignore/ default, 1 byte size, see above
|
||||
FT_NA_FLOAT='F', // ignore/ default, float size, see above
|
||||
FT_NA_POINTER='p', // fill default value into dest, pointer size, Use this only with static data (otherwise mem-leak)
|
||||
FT_STRING='s', //char*
|
||||
FT_FLOAT='f', //float
|
||||
FT_INT='i', //uint32
|
||||
FT_BYTE='b', //uint8
|
||||
FT_SORT='d', //sorted by this field, field is not included
|
||||
FT_IND='n', //the same,but parsed to data
|
||||
FT_LOGIC='l' //Logical (boolean)
|
||||
FT_NA = 'x', // ignore/ default, 4 byte size, in Source String means field is ignored, in Dest String means field is filled with default value
|
||||
FT_NA_BYTE = 'X', // ignore/ default, 1 byte size, see above
|
||||
FT_NA_FLOAT = 'F', // ignore/ default, float size, see above
|
||||
FT_NA_POINTER = 'p', // fill default value into dest, pointer size, Use this only with static data (otherwise mem-leak)
|
||||
FT_STRING = 's', //char*
|
||||
FT_FLOAT = 'f', //float
|
||||
FT_INT = 'i', //uint32
|
||||
FT_BYTE = 'b', //uint8
|
||||
FT_SORT = 'd', //sorted by this field, field is not included
|
||||
FT_IND = 'n', //the same,but parsed to data
|
||||
FT_LOGIC = 'l' //Logical (boolean)
|
||||
};
|
||||
|
||||
class DBCFileLoader
|
||||
|
|
@ -51,21 +51,21 @@ class DBCFileLoader
|
|||
float getFloat(size_t field) const
|
||||
{
|
||||
assert(field < file.fieldCount);
|
||||
float val = *reinterpret_cast<float*>(offset+file.GetOffset(field));
|
||||
float val = *reinterpret_cast<float*>(offset + file.GetOffset(field));
|
||||
EndianConvert(val);
|
||||
return val;
|
||||
}
|
||||
uint32 getUInt(size_t field) const
|
||||
{
|
||||
assert(field < file.fieldCount);
|
||||
uint32 val = *reinterpret_cast<uint32*>(offset+file.GetOffset(field));
|
||||
uint32 val = *reinterpret_cast<uint32*>(offset + file.GetOffset(field));
|
||||
EndianConvert(val);
|
||||
return val;
|
||||
}
|
||||
uint8 getUInt8(size_t field) const
|
||||
{
|
||||
assert(field < file.fieldCount);
|
||||
return *reinterpret_cast<uint8*>(offset+file.GetOffset(field));
|
||||
return *reinterpret_cast<uint8*>(offset + file.GetOffset(field));
|
||||
}
|
||||
|
||||
const char* getString(size_t field) const
|
||||
|
|
@ -92,7 +92,7 @@ class DBCFileLoader
|
|||
uint32 GetNumRows() const { return recordCount;}
|
||||
uint32 GetCols() const { return fieldCount; }
|
||||
uint32 GetOffset(size_t id) const { return (fieldsOffset != NULL && id < fieldCount) ? fieldsOffset[id] : 0; }
|
||||
bool IsLoaded() {return (data!=NULL);}
|
||||
bool IsLoaded() {return (data != NULL);}
|
||||
char* AutoProduceData(const char* fmt, uint32& count, char**& indexTable);
|
||||
char* AutoProduceStrings(const char* fmt, char* dataTable);
|
||||
static uint32 GetFormatRecordSize(const char* format, int32* index_pos = NULL);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue