MCPcopy Create free account
hub / github.com/comaps/comaps / ScopedMarkTokens

Method ScopedMarkTokens

libs/search/geocoder.cpp:91–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89 static BaseContext::TokenType constexpr kUnused = BaseContext::TOKEN_TYPE_COUNT;
90
91 ScopedMarkTokens(vector<BaseContext::TokenType> & tokens, BaseContext::TokenType type, TokenRange const & range)
92 : m_tokens(tokens)
93 , m_type(type)
94 , m_range(range)
95 {
96 ASSERT(m_range.IsValid(), ());
97 ASSERT_LESS_OR_EQUAL(m_range.End(), m_tokens.size(), ());
98#if defined(DEBUG)
99 for (size_t i : m_range)
100 ASSERT_EQUAL(m_tokens[i], kUnused, (i));
101#endif
102 fill(m_tokens.begin() + m_range.Begin(), m_tokens.begin() + m_range.End(), m_type);
103 }
104
105 ~ScopedMarkTokens()
106 {

Callers

nothing calls this directly

Calls 6

ASSERTFunction · 0.85
IsValidMethod · 0.45
EndMethod · 0.45
sizeMethod · 0.45
beginMethod · 0.45
BeginMethod · 0.45

Tested by

no test coverage detected