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

Function parseIntArg

src/bzfs/CmdLineOptions.cpp:333–342  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

331
332
333static int parseIntArg(int& i, const std::vector<std::string>& tokens,
334 int offset = 0) {
335 if ((i + 1) >= (int)tokens.size()) {
336 std::cerr << "ERROR: integer argument expected for "
337 << tokens[i - offset] << std::endl;
338 usage("bzfs");
339 }
340 i++; // skip the option argument string
341 return atoi(tokens[i].c_str());
342}
343
344
345static float parseFloatArg(int& i, const std::vector<std::string>& tokens,

Callers 1

parseMethod · 0.85

Calls 3

c_strMethod · 0.80
usageFunction · 0.70
sizeMethod · 0.45

Tested by

no test coverage detected