MCPcopy Create free account
hub / github.com/OpenOrienteering/mapper / findColorIndex

Method findColorIndex

src/core/map.cpp:1275–1288  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1273}
1274
1275int Map::findColorIndex(const MapColor* color) const
1276{
1277 std::size_t size = color_set->colors.size();
1278 for (std::size_t i = 0; i < size; ++i)
1279 {
1280 if (color_set->colors[i] == color)
1281 return (int)i;
1282 }
1283 if (color && color->getPriority() == MapColor::Registration)
1284 {
1285 return MapColor::Registration;
1286 }
1287 return -1;
1288}
1289
1290void Map::setColorsDirty()
1291{

Callers 8

hasAlphaMethod · 0.80
saveMethod · 0.80
saveImplMethod · 0.80
saveMethod · 0.80
saveImplMethod · 0.80
saveImplMethod · 0.80
saveImplMethod · 0.80
convertColorMethod · 0.80

Calls 2

getPriorityMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected