diff options
author | Kargatum <dowlandtop@yandex.com> | 2020-11-17 16:59:58 +0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-17 16:59:58 +0700 |
commit | 7f26c9ddaddb99fb47c6738c997e2fd2dbd876e4 (patch) | |
tree | 2840040cb71b3735ff7a1d6447fc5273831bf676 /src/common/DataStores/DBCFileLoader.cpp | |
parent | 0bee5af962c012085dc3c79a9ca95c7903a24863 (diff) |
refactor(Core/Common): restyle tools with astyle (#3706)
Diffstat (limited to 'src/common/DataStores/DBCFileLoader.cpp')
-rw-r--r-- | src/common/DataStores/DBCFileLoader.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/common/DataStores/DBCFileLoader.cpp b/src/common/DataStores/DBCFileLoader.cpp index 24deb407db..57502a6d40 100644 --- a/src/common/DataStores/DBCFileLoader.cpp +++ b/src/common/DataStores/DBCFileLoader.cpp @@ -275,17 +275,17 @@ char* DBCFileLoader::AutoProduceStrings(char const* format, char* dataTable) offset += sizeof(uint8); break; case FT_STRING: + { + // fill only not filled entries + char** slot = (char**)(&dataTable[offset]); + if (!*slot || !** slot) { - // fill only not filled entries - char** slot = (char**)(&dataTable[offset]); - if (!*slot || !** slot) - { - const char* st = getRecord(y).getString(x); - *slot = stringPool + (st - (char const*)stringTable); - } - offset += sizeof(char*); - break; + const char* st = getRecord(y).getString(x); + *slot = stringPool + (st - (char const*)stringTable); } + offset += sizeof(char*); + break; + } case FT_LOGIC: ASSERT(false && "Attempted to load DBC files that does not have field types that match what is in the core. Check DBCfmt.h or your DBC files."); break; |