MCPcopy Create free account
hub / github.com/TactilityProject/Tactility / fromString

Function fromString

Tactility/Source/settings/DisplaySettings.cpp:50–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48}
49
50static bool fromString(const std::string& str, Orientation& orientation) {
51 if (str == "Portrait") {
52 orientation = Orientation::Portrait;
53 return true;
54 } else if (str == "Landscape") {
55 orientation = Orientation::Landscape;
56 return true;
57 } else if (str == "PortraitFlipped") {
58 orientation = Orientation::PortraitFlipped;
59 return true;
60 } else if (str == "LandscapeFlipped") {
61 orientation = Orientation::LandscapeFlipped;
62 return true;
63 } else {
64 return false;
65 }
66}
67
68static std::string toString(ScreensaverType type) {
69 switch (type) {

Callers 1

loadFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected