Fix ifs clang-format didn’t get

This commit is contained in:
numzero
2023-10-04 21:10:58 +03:00
committed by sfan5
parent e5b97d440a
commit b01a3ea781
25 changed files with 69 additions and 138 deletions

View File

@ -425,13 +425,11 @@ core::dimension2d<u32> CGUIFont::getDimension(const wchar_t *text) const
for (const wchar_t *p = text; *p; ++p) {
bool lineBreak = false;
if (*p == L'\r') // Mac or Windows breaks
{
if (*p == L'\r') { // Mac or Windows breaks
lineBreak = true;
if (p[1] == L'\n') // Windows breaks
++p;
} else if (*p == L'\n') // Unix breaks
{
} else if (*p == L'\n') { // Unix breaks
lineBreak = true;
}
if (lineBreak) {
@ -489,13 +487,11 @@ void CGUIFont::draw(const core::stringw &text, const core::rect<s32> &position,
wchar_t c = text[i];
bool lineBreak = false;
if (c == L'\r') // Mac or Windows breaks
{
if (c == L'\r') { // Mac or Windows breaks
lineBreak = true;
if (text[i + 1] == L'\n') // Windows breaks
c = text[++i];
} else if (c == L'\n') // Unix breaks
{
} else if (c == L'\n') { // Unix breaks
lineBreak = true;
}