Indentations

Former-commit-id: 0d82a4464cb9369bc4ca5cf2d7780c921eff953d
This commit is contained in:
Gawaboumga
2015-08-21 11:32:29 +02:00
parent 0b390e45a1
commit 376df6a3b7
9 changed files with 33 additions and 35 deletions

View File

@@ -11,6 +11,7 @@
#include <Nazara/Core/Unicode.hpp>
#include <Nazara/Math/Algorithm.hpp>
#include <algorithm>
#include <cctype>
#include <cstdio>
#include <cstring>
#include <limits>
@@ -50,24 +51,24 @@ inline char nzToUpper(char character)
inline int nzStrcasecmp(const char* s1, const char* s2)
{
int ret = 0;
int ret = 0;
while (!(ret = static_cast<unsigned char>(nzToLower(*s1)) - static_cast<unsigned char>(nzToLower(*s2))) && *s2)
++s1, ++s2;
while (!(ret = static_cast<unsigned char>(nzToLower(*s1)) - static_cast<unsigned char>(nzToLower(*s2))) && *s2)
++s1, ++s2;
return ret != 0 ? (ret > 0 ? 1 : -1) : 0;
return ret != 0 ? (ret > 0 ? 1 : -1) : 0;
}
inline int nzUnicodecasecmp(const char* s1, const char* s2)
{
int ret = 0;
int ret = 0;
utf8::unchecked::iterator<const char*> it1(s1);
utf8::unchecked::iterator<const char*> it2(s2);
while (!(ret = NzUnicode::GetLowercase(*it1) - NzUnicode::GetLowercase(*it2)) && *it2)
++it1, ++it2;
while (!(ret = NzUnicode::GetLowercase(*it1) - NzUnicode::GetLowercase(*it2)) && *it2)
++it1, ++it2;
return ret != 0 ? (ret > 0 ? 1 : -1) : 0;
return ret != 0 ? (ret > 0 ? 1 : -1) : 0;
}
NzString::NzString() :
@@ -2087,8 +2088,8 @@ bool NzString::Match(const char* pattern) const
if (!*++pattern)
return true;
mp = pattern;
cp = str+1;
mp = pattern;
cp = str+1;
}
else if (*pattern == *str || *pattern == '?')
{
@@ -3977,7 +3978,7 @@ NzString NzString::Unicode(char32_t character)
count = 2;
else if (character < 0x10000)
count = 3;
else
else
count = 4;
char* str = new char[count+1];
@@ -4028,7 +4029,7 @@ NzString NzString::Unicode(const char32_t* u32String)
count += 2;
else if (cp < 0x10000)
count += 3;
else
else
count += 4;
}
while (*++ptr);
@@ -4056,7 +4057,7 @@ NzString NzString::Unicode(const wchar_t* wString)
count += 2;
else if (cp < 0x10000)
count += 3;
else
else
count += 4;
}
while (*++ptr);

View File

@@ -53,7 +53,7 @@ bool NzVertexBuffer::FillRaw(const void* data, unsigned int offset, unsigned int
if (!m_buffer)
{
NazaraError("No buffer");
return nullptr;
return false;
}
if (m_startOffset + offset + size > m_endOffset)