| 343 | |
| 344 | |
| 345 | static float parseFloatArg(int& i, const std::vector<std::string>& tokens, |
| 346 | int offset = 0) { |
| 347 | if ((i + 1) >= (int)tokens.size()) { |
| 348 | std::cerr << "ERROR: float argument expected for " |
| 349 | << tokens[i - offset] << std::endl; |
| 350 | usage("bzfs"); |
| 351 | } |
| 352 | i++; // skip the option argument string |
| 353 | return (float)atof(tokens[i].c_str()); |
| 354 | } |
| 355 | |
| 356 | |
| 357 | static std::string parseStringArg(int& i, const std::vector<std::string>& tokens, |