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

Function toString

Tactility/Source/settings/DisplaySettings.cpp:34–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32}
33
34static std::string toString(Orientation orientation) {
35 switch (orientation) {
36 using enum Orientation;
37 case Portrait:
38 return "Portrait";
39 case Landscape:
40 return "Landscape";
41 case PortraitFlipped:
42 return "PortraitFlipped";
43 case LandscapeFlipped:
44 return "LandscapeFlipped";
45 default:
46 std::unreachable();
47 }
48}
49
50static bool fromString(const std::string& str, Orientation& orientation) {
51 if (str == "Portrait") {

Callers 1

saveFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected