mirror of
https://github.com/minetest/irrlicht.git
synced 2025-06-30 23:30:27 +02:00
Fix ifs clang-format didn’t get
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user