MCPcopy Create free account
hub / github.com/OpenDungeons/OpenDungeons / fromString

Function fromString

source/game/SkillType.cpp:26–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24{
25
26SkillType fromString(const std::string& type)
27{
28 for(uint32_t i = 0; i < static_cast<uint32_t>(SkillType::countSkill); ++i)
29 {
30 SkillType skillType = static_cast<SkillType>(i);
31 if(type != toString(skillType))
32 continue;
33
34 return skillType;
35 }
36
37 return SkillType::nullSkillType;
38}
39
40std::string toString(SkillType type)
41{

Callers 1

importFromStreamMethod · 0.50

Calls 1

toStringFunction · 0.70

Tested by

no test coverage detected