MCPcopy Create free account
hub / github.com/ModOrganizer2/modorganizer / gameFeature

Method gameFeature

src/game_features.cpp:332–348  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

330}
331
332std::shared_ptr<GameFeature> GameFeatures::gameFeature(std::type_info const& info) const
333{
334 if (info == ModDataCheckerIndex) {
335 return modDataChecker().isValid() ? m_modDataChecker : nullptr;
336 }
337
338 if (info == ModDataContentIndex) {
339 return modDataContent().isValid() ? m_modDataContent : nullptr;
340 }
341
342 auto it = m_currentFeatures.find(info);
343 if (it == m_currentFeatures.end() || it->second.empty()) {
344 return nullptr;
345 }
346
347 return it->second.front();
348}

Callers 1

gameFeatureImplMethod · 0.45

Calls 4

isValidMethod · 0.45
findMethod · 0.45
endMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected