MCPcopy Create free account
hub / github.com/OSVR/OSVR-Core / convertHideIntoFalseShow

Function convertHideIntoFalseShow

inc/osvr/Util/ProgramOptionsToggleFlags.h:42–51  ·  view source on GitHub ↗

@brief An "additional parser" for Boost.Program_options that will turn any --hide-xyz into --show-xyz false

Source from the content-addressed store, hash-verified

40 /// @brief An "additional parser" for Boost.Program_options that will turn
41 /// any --hide-xyz into --show-xyz false
42 inline std::pair<std::string, std::string>
43 convertHideIntoFalseShow(const std::string &s) {
44 static const char hidePrefix[] = "--hide";
45 static const char showPrefix[] = "show";
46 if (s.find(hidePrefix) == 0) {
47 return std::make_pair(showPrefix + s.substr(sizeof(hidePrefix) - 1),
48 std::string("false"));
49 }
50 return std::make_pair(std::string(), std::string());
51 }
52} // namespace util
53} // namespace osvr
54

Callers

nothing calls this directly

Calls 1

findMethod · 0.45

Tested by

no test coverage detected