mirror of
https://github.com/SFML/SFML.git
synced 2024-12-01 15:51:04 +08:00
Use ranged for loop
This commit is contained in:
parent
e11154e7f7
commit
819bdb67e9
@ -414,10 +414,8 @@ void Text::ensureGeometryUpdate() const
|
|||||||
float maxX = 0.f;
|
float maxX = 0.f;
|
||||||
float maxY = 0.f;
|
float maxY = 0.f;
|
||||||
std::uint32_t prevChar = 0;
|
std::uint32_t prevChar = 0;
|
||||||
for (std::size_t i = 0; i < m_string.getSize(); ++i)
|
for (const std::uint32_t curChar : m_string)
|
||||||
{
|
{
|
||||||
const std::uint32_t curChar = m_string[i];
|
|
||||||
|
|
||||||
// Skip the \r char to avoid weird graphical issues
|
// Skip the \r char to avoid weird graphical issues
|
||||||
if (curChar == U'\r')
|
if (curChar == U'\r')
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user