mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
Various Cleanups (shared/Database/)
This commit is contained in:
parent
9753625fd1
commit
c334cd5ea4
25 changed files with 508 additions and 508 deletions
|
|
@ -23,7 +23,7 @@ void SQLStorage::EraseEntry(uint32 id)
|
|||
uint32 offset = 0;
|
||||
for (uint32 x = 0; x < oNumFields; ++x)
|
||||
{
|
||||
switch(dst_format[x])
|
||||
switch (dst_format[x])
|
||||
{
|
||||
case FT_LOGIC:
|
||||
offset += sizeof(bool); break;
|
||||
|
|
@ -35,7 +35,7 @@ void SQLStorage::EraseEntry(uint32 id)
|
|||
offset += sizeof(float); break;
|
||||
case FT_STRING:
|
||||
{
|
||||
if(pIndex[id])
|
||||
if (pIndex[id])
|
||||
delete [] *(char**)((char*)(pIndex[id])+offset);
|
||||
|
||||
offset += sizeof(char*);
|
||||
|
|
@ -62,12 +62,12 @@ void SQLStorage::EraseEntry(uint32 id)
|
|||
pIndex[id] = NULL;
|
||||
}
|
||||
|
||||
void SQLStorage::Free ()
|
||||
void SQLStorage::Free()
|
||||
{
|
||||
uint32 offset = 0;
|
||||
for (uint32 x = 0; x < oNumFields; ++x)
|
||||
{
|
||||
switch(dst_format[x])
|
||||
switch (dst_format[x])
|
||||
{
|
||||
case FT_LOGIC:
|
||||
offset += sizeof(bool); break;
|
||||
|
|
@ -79,8 +79,8 @@ void SQLStorage::Free ()
|
|||
offset += sizeof(float); break;
|
||||
case FT_STRING:
|
||||
{
|
||||
for(uint32 y = 0; y < MaxEntry; ++y)
|
||||
if(pIndex[y])
|
||||
for (uint32 y = 0; y < MaxEntry; ++y)
|
||||
if (pIndex[y])
|
||||
delete [] *(char**)((char*)(pIndex[y])+offset);
|
||||
|
||||
offset += sizeof(char*);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue