You've already forked iw4x-client
Optimize loops.
This commit is contained in:
@ -41,7 +41,7 @@ namespace Utils
|
||||
{
|
||||
int count = 0;
|
||||
|
||||
for (int i = 0; i < CSV::GetRows(); i++)
|
||||
for (int i = 0; i < CSV::GetRows(); ++i)
|
||||
{
|
||||
count = max(CSV::GetColumns(i), count);
|
||||
}
|
||||
@ -96,7 +96,7 @@ namespace Utils
|
||||
std::vector<std::string> _row;
|
||||
char tempStr = 0;
|
||||
|
||||
for (unsigned int i = 0; i < row.size(); i++)
|
||||
for (unsigned int i = 0; i < row.size(); ++i)
|
||||
{
|
||||
if (row[i] == ',' && !isString) // FLush entry
|
||||
{
|
||||
|
@ -15,7 +15,7 @@ namespace Utils
|
||||
}
|
||||
~Allocator()
|
||||
{
|
||||
for (auto i = this->RefMemory.begin(); i != this->RefMemory.end(); i++)
|
||||
for (auto i = this->RefMemory.begin(); i != this->RefMemory.end(); ++i)
|
||||
{
|
||||
if (i->first && i->second)
|
||||
{
|
||||
|
@ -67,7 +67,7 @@ namespace Utils
|
||||
{
|
||||
auto ret = Stream::Length();
|
||||
|
||||
for (size_t i = 0; i < count; i++)
|
||||
for (size_t i = 0; i < count; ++i)
|
||||
{
|
||||
Stream::Save(stream, &value, 4, 1);
|
||||
}
|
||||
@ -108,7 +108,7 @@ namespace Utils
|
||||
{
|
||||
auto ret = Stream::Length();
|
||||
|
||||
for (size_t i = 0; i < count; i++)
|
||||
for (size_t i = 0; i < count; ++i)
|
||||
{
|
||||
Stream::Save(&byte, 1);
|
||||
}
|
||||
|
@ -191,7 +191,7 @@ namespace Utils
|
||||
|
||||
bool first = true;
|
||||
|
||||
for (auto i = this->KeyValuePairs.begin(); i != this->KeyValuePairs.end(); i++)
|
||||
for (auto i = this->KeyValuePairs.begin(); i != this->KeyValuePairs.end(); ++i)
|
||||
{
|
||||
if (first) first = false;
|
||||
else infoString.append("\\");
|
||||
@ -206,7 +206,7 @@ namespace Utils
|
||||
|
||||
void InfoString::Dump()
|
||||
{
|
||||
for (auto i = this->KeyValuePairs.begin(); i != this->KeyValuePairs.end(); i++)
|
||||
for (auto i = this->KeyValuePairs.begin(); i != this->KeyValuePairs.end(); ++i)
|
||||
{
|
||||
OutputDebugStringA(Utils::VA("%s: %s", i->first.data(), i->second.data()));
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ namespace Utils
|
||||
{
|
||||
if (source)
|
||||
{
|
||||
for (size_t i = 0; i < length; i++)
|
||||
for (size_t i = 0; i < length; ++i)
|
||||
{
|
||||
target->push_back(source[i]);
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ namespace Utils
|
||||
// Parse protocol
|
||||
if (pURL.cchProtocol && pURL.cchProtocol != 0xCCCCCCCC && pURL.pszProtocol)
|
||||
{
|
||||
for (UINT i = 0; i < pURL.cchProtocol; i++)
|
||||
for (UINT i = 0; i < pURL.cchProtocol; ++i)
|
||||
{
|
||||
char lChar = static_cast<char>(tolower(pURL.pszProtocol[i]));
|
||||
WebIO::m_sUrl.protocol.append(&lChar, 1);
|
||||
@ -116,7 +116,7 @@ namespace Utils
|
||||
{
|
||||
std::string body;
|
||||
|
||||
for (auto param = params.begin(); param != params.end(); param++)
|
||||
for (auto param = params.begin(); param != params.end(); ++param)
|
||||
{
|
||||
std::string key = param->first;
|
||||
std::string value = param->second;
|
||||
|
Reference in New Issue
Block a user