MCPcopy Create free account
hub / github.com/chrxh/alien / convert

Function convert

source/Gui/WindowController.cpp:18–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16 auto const DesktopMode = std::string("desktop");
17
18 GLFWvidmode convert(std::string const& mode)
19 {
20 std::vector<std::string> modeParts;
21 boost::split(modeParts, mode, [](char c) { return c == ' '; });
22
23 CHECK(modeParts.size() == 6);
24
25 GLFWvidmode result;
26 result.width = std::stoi(modeParts.at(0));
27 result.height = std::stoi(modeParts.at(1));
28 result.redBits = std::stoi(modeParts.at(2));
29 result.greenBits = std::stoi(modeParts.at(3));
30 result.blueBits = std::stoi(modeParts.at(4));
31 result.refreshRate = std::stoi(modeParts.at(5));
32 return result;
33 }
34
35 std::string convert(GLFWvidmode const& vidmode)
36 {

Callers 3

setModeMethod · 0.70

Calls 3

splitFunction · 0.85
to_stringFunction · 0.85
sizeMethod · 0.80

Tested by

no test coverage detected