diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2022-08-21 13:45:53 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2022-08-21 13:45:53 +0100 |
commit | 51b667f0cb48f95549eef3a024af795cf4834d95 (patch) | |
tree | c21a06d07b6a7b3f891fc0b300e19e534e01dd62 | |
parent | Reduce variable scope (diff) | |
download | ilt-51b667f0cb48f95549eef3a024af795cf4834d95.tar.bz2 ilt-51b667f0cb48f95549eef3a024af795cf4834d95.tar.xz ilt-51b667f0cb48f95549eef3a024af795cf4834d95.zip |
Fix shadowing
-rw-r--r-- | ui/font.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ui/font.cpp b/ui/font.cpp index e5432b8..93b36e1 100644 --- a/ui/font.cpp +++ b/ui/font.cpp @@ -172,11 +172,11 @@ Font::render(const std::string_view chars) const } const auto charPos = pos + glm::vec2 {ch.bearing.x, ch.bearing.y - static_cast<int>(ch.size.y)}; - const auto size = glm::vec2 {ch.size}; + const auto chSize = glm::vec2 {ch.size}; out[fontTextures[ch.textureIdx].texture].emplace_back( - transform_array(C, [&size, &charPos, &ch, this](const auto & c) { - return (charPos + (size * c.first)) + transform_array(C, [&chSize, &charPos, &ch, this](const auto & c) { + return (charPos + (chSize * c.first)) || ((glm::vec2 {ch.position} + (glm::vec2 {ch.size} * c.second)) / glm::vec2 {this->size}); })); |