From c728c19ed80302772be1c32c6c842aa30839c152 Mon Sep 17 00:00:00 2001 From: Zufu Liu Date: Mon, 21 Jun 2021 07:31:12 +1000 Subject: Avoid extra lookup for mapReprs. --- src/PositionCache.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/PositionCache.cxx b/src/PositionCache.cxx index d3347248b..285bf2816 100644 --- a/src/PositionCache.cxx +++ b/src/PositionCache.cxx @@ -566,7 +566,7 @@ void SpecialRepresentations::SetRepresentationAppearance(std::string_view charBy // Not present so fail return; } - mapReprs[key].appearance = appearance; + it->second.appearance = appearance; } } @@ -578,8 +578,8 @@ void SpecialRepresentations::SetRepresentationColour(std::string_view charBytes, // Not present so fail return; } - mapReprs[key].appearance = mapReprs[key].appearance | RepresentationAppearance::Colour; - mapReprs[key].colour = colour; + it->second.appearance = it->second.appearance | RepresentationAppearance::Colour; + it->second.colour = colour; } } -- cgit v1.2.3