MCPcopy Create free account
hub / github.com/BZFlag-Dev/bzflag / parseDebugNetStyle

Function parseDebugNetStyle

src/clientbase/playing.cpp:1867–1888  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1865
1866
1867static void parseDebugNetStyle(const std::string& style, int& level,
1868 std::set<uint16_t>& includeTypes,
1869 std::set<uint16_t>& excludeTypes) {
1870 level = 1;
1871 includeTypes.clear();
1872 excludeTypes.clear();
1873
1874 std::vector<std::string> args = TextUtils::tokenize(style, ",");
1875 for (size_t i = 0; i < args.size(); i++) {
1876 const std::string& a = args[i];
1877 if (isdigit(a[0])) {
1878 level = atoi(a.c_str());
1879 }
1880 else if (a.size() == 3) {
1881 const uint16_t type = (a[1] << 8) | a[2];
1882 switch (a[0]) {
1883 case '+': { includeTypes.insert(type); break; }
1884 case '-': { excludeTypes.insert(type); break; }
1885 }
1886 }
1887 }
1888}
1889
1890
1891static void debugNetMessages(uint16_t code, uint16_t len, void* msg) {

Callers 1

debugNetMessagesFunction · 0.85

Calls 5

c_strMethod · 0.80
tokenizeFunction · 0.50
clearMethod · 0.45
sizeMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected