Apply style fix pt5

This commit is contained in:
Antz 2020-01-14 13:12:16 +00:00
parent 4727d8846f
commit 1a1110b4f7
67 changed files with 648 additions and 214 deletions

View file

@ -70,7 +70,9 @@ void BigNumber::SetBinary(const uint8* bytes, int len)
{
uint8 t[1000];
for (int i = 0; i < len; ++i)
{ t[i] = bytes[len - 1 - i]; }
{
t[i] = bytes[len - 1 - i];
}
BN_bin2bn(t, len, _bn);
}

View file

@ -62,7 +62,9 @@ void SqlConnection::FreePreparedStatements()
size_t nStmts = m_holder.size();
for (size_t i = 0; i < nStmts; ++i)
{ delete m_holder[i]; }
{
delete m_holder[i];
}
m_holder.clear();
}
@ -193,7 +195,9 @@ void Database::StopServer()
m_pAsyncConn = NULL;
for (size_t i = 0; i < m_pQueryConnections.size(); ++i)
{ delete m_pQueryConnections[i]; }
{
delete m_pQueryConnections[i];
}
m_pQueryConnections.clear();
}

View file

@ -268,7 +268,9 @@ QueryNamedResult* MySQLConnection::QueryNamed(const char* sql)
QueryFieldNames names(fieldCount);
for (uint32 i = 0; i < fieldCount; ++i)
{ names[i] = fields[i].name; }
{
names[i] = fields[i].name;
}
QueryResultMysql* queryResult = new QueryResultMysql(result, fields, rowCount, fieldCount);

View file

@ -196,7 +196,9 @@ QueryNamedResult* PostgreSQLConnection::QueryNamed(const char* sql)
QueryFieldNames names(fieldCount);
for (uint32 i = 0; i < fieldCount; ++i)
{ names[i] = PQfname(result, i); }
{
names[i] = PQfname(result, i);
}
QueryResultPostgre* queryResult = new QueryResultPostgre(result, rowCount, fieldCount);

View file

@ -61,7 +61,9 @@ bool QueryResultMysql::NextRow()
}
for (uint32 i = 0; i < mFieldCount; ++i)
{ mCurrentRow[i].SetValue(row[i]); }
{
mCurrentRow[i].SetValue(row[i]);
}
return true;
}

View file

@ -34,7 +34,9 @@ QueryResultPostgre::QueryResultPostgre(PGresult* result, uint64 rowCount, uint32
MANGOS_ASSERT(mCurrentRow);
for (uint32 i = 0; i < mFieldCount; ++i)
{ mCurrentRow[i].SetType(ConvertNativeType(PQftype(result, i))); }
{
mCurrentRow[i].SetType(ConvertNativeType(PQftype(result, i)));
}
}
QueryResultPostgre::~QueryResultPostgre()

View file

@ -90,7 +90,9 @@ void SQLStorageBase::Free()
case DBC_FF_STRING:
{
for (uint32 recordItr = 0; recordItr < m_recordCount; ++recordItr)
{ delete[] *(char**)((char*)(m_data + (recordItr * m_recordSize)) + offset); }
{
delete[] *(char**)((char*)(m_data + (recordItr * m_recordSize)) + offset);
}
offset += sizeof(char*);
break;

View file

@ -111,7 +111,9 @@ void Log::InitColors(const std::string& str)
}
for (int i = 0; i < LogType_count; ++i)
{ m_colors[i] = Color(color[i]); }
{
m_colors[i] = Color(color[i]);
}
m_colored = true;
}
@ -1169,7 +1171,9 @@ void Log::outWorldPacketDump(uint32 socket, uint32 opcode, char const* opcodeNam
while (p < packet->size())
{
for (size_t j = 0; j < 16 && p < packet->size(); ++j)
{ fprintf(worldLogfile, "%.2X ", (*packet)[p++]); }
{
fprintf(worldLogfile, "%.2X ", (*packet)[p++]);
}
fprintf(worldLogfile, "\n");
}

View file

@ -33,7 +33,9 @@ using namespace ACE_Based;
ThreadPriority::ThreadPriority()
{
for (int i = Idle; i < MAXPRIORITYNUM; ++i)
{ m_priority[i] = ACE_THR_PRI_OTHER_DEF; }
{
m_priority[i] = ACE_THR_PRI_OTHER_DEF;
}
m_priority[Idle] = ACE_Sched_Params::priority_min(ACE_SCHED_OTHER);
m_priority[Realtime] = ACE_Sched_Params::priority_max(ACE_SCHED_OTHER);

View file

@ -69,7 +69,10 @@ void BarGoLink::init(int row_count)
#else
printf("[");
#endif
for (int i = 0; i < indic_len; ++i) { printf(empty); }
for (int i = 0; i < indic_len; ++i)
{
printf(empty);
}
#ifdef _WIN32
printf("\x3D 0%%\r\x3D");
#else
@ -100,8 +103,14 @@ void BarGoLink::step()
#else
printf("\r[");
#endif
for (i = 0; i < n; ++i) { printf(full); }
for (; i < indic_len; ++i) { printf(empty); }
for (i = 0; i < n; ++i)
{
printf(full);
}
for (; i < indic_len; ++i)
{
printf(empty);
}
float percent = (((float)n / (float)indic_len) * 100);
#ifdef _WIN32
printf("\x3D %i%% \r\x3D", (int)percent);

View file

@ -830,7 +830,9 @@ char* WheatyExceptionReport::DumpTypeIndex(
{
// Add appropriate indentation level (since this routine is recursive)
for (unsigned j = 0; j <= nestingLevel + 1; ++j)
{ pszCurrBuffer += sprintf(pszCurrBuffer, "\t"); }
{
pszCurrBuffer += sprintf(pszCurrBuffer, "\t");
}
// Recurse for each of the child types
bool bHandled2;