Apply style fix

This commit is contained in:
Antz 2020-01-10 23:13:44 +00:00
parent 5531a0087d
commit 35405dd549
155 changed files with 10968 additions and 3660 deletions

View file

@ -41,7 +41,9 @@ bool DBCFileLoader::Load(const char* filename, const char* fmt)
FILE* f = fopen(filename, "rb");
if (!f)
{ return false; }
{
return false;
}
if (fread(&header, 4, 1, f) != 1) // Number of records
{
@ -94,7 +96,9 @@ bool DBCFileLoader::Load(const char* filename, const char* fmt)
{
fieldsOffset[i] = fieldsOffset[i - 1];
if (fmt[i - 1] == 'b' || fmt[i - 1] == 'X') // byte fields
{ fieldsOffset[i] += 1; }
{
fieldsOffset[i] += 1;
}
else // 4 byte fields (int32/float/strings)
{ fieldsOffset[i] += 4; }
}
@ -164,7 +168,9 @@ uint32 DBCFileLoader::GetFormatRecordSize(const char* format, int32* index_pos)
}
if (index_pos)
{ *index_pos = i; }
{
*index_pos = i;
}
return recordsize;
}
@ -194,7 +200,9 @@ char* DBCFileLoader::AutoProduceData(const char* format, uint32& records, char**
typedef char* ptr;
if (strlen(format) != fieldCount)
{ return NULL; }
{
return NULL;
}
// get struct size and index pos
int32 i;
@ -208,7 +216,9 @@ char* DBCFileLoader::AutoProduceData(const char* format, uint32& records, char**
{
uint32 ind = getRecord(y).getUInt(i);
if (ind > maxi)
{ maxi = ind; }
{
maxi = ind;
}
}
++maxi;
@ -337,7 +347,9 @@ char* DBCFileLoader::AutoProduceStringsArrayHolders(const char* format, char* da
char* DBCFileLoader::AutoProduceStrings(const char* format, char* dataTable, LocaleConstant loc)
{
if (strlen(format) != fieldCount)
{ return NULL; }
{
return NULL;
}
// each string field at load have array of string for each locale
size_t stringHolderSize = sizeof(char*) * MAX_LOCALE;