From 51b667f0cb48f95549eef3a024af795cf4834d95 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 21 Aug 2022 13:45:53 +0100 Subject: Fix shadowing --- ui/font.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ui') 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(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}); })); -- cgit v1.2.3