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

Method GetSymbolRegionSafe

libs/drape/texture_manager.cpp:461–476  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

459}
460
461bool TextureManager::GetSymbolRegionSafe(std::string const & symbolName, SymbolRegion & region)
462{
463 CHECK(m_isInitialized, ());
464 for (size_t i = 0; i < m_symbolTextures.size(); ++i)
465 {
466 ref_ptr<SymbolsTexture> symbolsTexture = make_ref(m_symbolTextures[i]);
467 ASSERT(symbolsTexture != nullptr, ());
468 if (symbolsTexture->IsSymbolContained(symbolName))
469 {
470 GetRegionBase(symbolsTexture, region, SymbolsTexture::SymbolKey(symbolName));
471 region.SetTextureIndex(static_cast<uint32_t>(i));
472 return true;
473 }
474 }
475 return false;
476}
477
478void TextureManager::GetSymbolRegion(std::string const & symbolName, SymbolRegion & region)
479{

Callers 1

CacheUserMarksFunction · 0.80

Calls 6

make_refFunction · 0.85
ASSERTFunction · 0.85
SymbolKeyClass · 0.85
IsSymbolContainedMethod · 0.80
sizeMethod · 0.45
SetTextureIndexMethod · 0.45

Tested by

no test coverage detected