Remove unused function

This commit is contained in:
Bob Polis 2024-11-25 16:36:36 +01:00
parent 1ec7553070
commit e718c5e66d

View File

@ -3,7 +3,6 @@
#include <string> #include <string>
#include <stdexcept> #include <stdexcept>
#include <climits> #include <climits>
#include <regex>
#include <algorithm> #include <algorithm>
#include <getopt.h> #include <getopt.h>
#include <libscnumerics.hpp> #include <libscnumerics.hpp>
@ -23,18 +22,6 @@ int min_digits {0};
int min_symbols {0}; int min_symbols {0};
int min_special {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[]) { int main(int argc, char* argv[]) {
try { try {
bool noflags {true}; bool noflags {true};