From c3d5994ca05b2bb9fb9534af606acce9ae3daa81 Mon Sep 17 00:00:00 2001 From: Zufu Liu Date: Sun, 17 Oct 2021 15:43:58 +1100 Subject: Remove SpecialRepresentations::Contains which is no longer used. --- src/PositionCache.cxx | 9 --------- src/PositionCache.h | 1 - 2 files changed, 10 deletions(-) diff --git a/src/PositionCache.cxx b/src/PositionCache.cxx index af1c5065c..6370edb33 100644 --- a/src/PositionCache.cxx +++ b/src/PositionCache.cxx @@ -632,15 +632,6 @@ const Representation *SpecialRepresentations::RepresentationFromCharacter(std::s return nullptr; } -bool SpecialRepresentations::Contains(std::string_view charBytes) const { - PLATFORM_ASSERT(charBytes.length() <= 4); - const unsigned char ucStart = charBytes.empty() ? 0 : charBytes[0]; - if (!startByteHasReprs[ucStart]) - return false; - const MapRepresentation::const_iterator it = mapReprs.find(KeyFromString(charBytes)); - return it != mapReprs.end(); -} - void SpecialRepresentations::Clear() { mapReprs.clear(); constexpr short none = 0; diff --git a/src/PositionCache.h b/src/PositionCache.h index 3c4ca88c3..154778f0a 100644 --- a/src/PositionCache.h +++ b/src/PositionCache.h @@ -209,7 +209,6 @@ public: void ClearRepresentation(std::string_view charBytes); const Representation *GetRepresentation(std::string_view charBytes) const; const Representation *RepresentationFromCharacter(std::string_view charBytes) const; - bool Contains(std::string_view charBytes) const; bool ContainsCrLf() const noexcept { return crlf; } -- cgit v1.2.3