From 8599e25dbd4e991f0de67e551aa38c3f658be2f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Thu, 5 Oct 2023 19:51:04 +0200 Subject: [PATCH] MagnumFont: properly underscore private variables. --- src/MagnumPlugins/MagnumFont/MagnumFont.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/MagnumPlugins/MagnumFont/MagnumFont.cpp b/src/MagnumPlugins/MagnumFont/MagnumFont.cpp index 96aeafd6a..dcaa0f3b1 100644 --- a/src/MagnumPlugins/MagnumFont/MagnumFont.cpp +++ b/src/MagnumPlugins/MagnumFont/MagnumFont.cpp @@ -69,10 +69,10 @@ namespace { private: Containers::Triple doRenderGlyph(UnsignedInt i) override; - const Containers::StridedArrayView1D glyphAdvance; - const AbstractGlyphCache& cache; - const Float fontSize, textSize; - const Containers::Array glyphs; + const Containers::StridedArrayView1D _glyphAdvance; + const AbstractGlyphCache& _cache; + const Float _fontSize, _textSize; + const Containers::Array _glyphs; }; } @@ -200,23 +200,23 @@ Containers::Pointer MagnumFont::doLayout(const AbstractGlyphCa namespace { -MagnumFontLayouter::MagnumFontLayouter(const Containers::StridedArrayView1D& glyphAdvance, const AbstractGlyphCache& cache, const Float fontSize, const Float textSize, Containers::Array&& glyphs): AbstractLayouter{UnsignedInt(glyphs.size())}, glyphAdvance{glyphAdvance}, cache(cache), fontSize{fontSize}, textSize{textSize}, glyphs{Utility::move(glyphs)} {} +MagnumFontLayouter::MagnumFontLayouter(const Containers::StridedArrayView1D& glyphAdvance, const AbstractGlyphCache& cache, const Float fontSize, const Float textSize, Containers::Array&& glyphs): AbstractLayouter{UnsignedInt(glyphs.size())}, _glyphAdvance{glyphAdvance}, _cache(cache), _fontSize{fontSize}, _textSize{textSize}, _glyphs{Utility::move(glyphs)} {} Containers::Triple MagnumFontLayouter::doRenderGlyph(const UnsignedInt i) { /* Position of the texture in the resulting glyph, texture coordinates */ Vector2i position; Range2Di rectangle; - std::tie(position, rectangle) = cache[glyphs[i]]; + std::tie(position, rectangle) = _cache[_glyphs[i]]; /* Normalized texture coordinates */ - const auto textureCoordinates = Range2D(rectangle).scaled(1.0f/Vector2(cache.textureSize())); + const auto textureCoordinates = Range2D(rectangle).scaled(1.0f/Vector2(_cache.textureSize())); /* Quad rectangle, computed from texture rectangle, denormalized to requested text size */ - const auto quadRectangle = Range2D(Range2Di::fromSize(position, rectangle.size())).scaled(Vector2(textSize/fontSize)); + const auto quadRectangle = Range2D(Range2Di::fromSize(position, rectangle.size())).scaled(Vector2(_textSize/_fontSize)); /* Advance for given glyph, denormalized to requested text size */ - const Vector2 advance = glyphAdvance[glyphs[i]]*(textSize/fontSize); + const Vector2 advance = _glyphAdvance[_glyphs[i]]*(_textSize/_fontSize); return {quadRectangle, textureCoordinates, advance}; }