Use ranged for loop

This commit is contained in:
Chris Thrasher 2023-10-02 15:25:08 -06:00
parent e11154e7f7
commit 819bdb67e9

View File

@ -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;