Remove unused function
This commit is contained in:
parent
1ec7553070
commit
e718c5e66d
13
src/main.cpp
13
src/main.cpp
@ -3,7 +3,6 @@
|
||||
#include <string>
|
||||
#include <stdexcept>
|
||||
#include <climits>
|
||||
#include <regex>
|
||||
#include <algorithm>
|
||||
#include <getopt.h>
|
||||
#include <libscnumerics.hpp>
|
||||
@ -23,18 +22,6 @@ int min_digits {0};
|
||||
int min_symbols {0};
|
||||
int min_special {0};
|
||||
|
||||
void validate_range(const std::string& arg, int& min_val, int& max_val) {
|
||||
std::regex pat {R"((\d+)(?:-(\d+))?)"};
|
||||
std::smatch match;
|
||||
if (std::regex_match(arg, match, pat)) {
|
||||
min_val = std::atoi(match[1].str().c_str());
|
||||
if (match.size() > 2) {
|
||||
max_val = std::atoi(match[2].str().c_str());
|
||||
}
|
||||
}
|
||||
throw std::runtime_error("invalid range");
|
||||
}
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
try {
|
||||
bool noflags {true};
|
||||
|
Loading…
x
Reference in New Issue
Block a user