aboutsummaryrefslogtreecommitdiff
path: root/src/mazerator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mazerator.cpp')
-rw-r--r--src/mazerator.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mazerator.cpp b/src/mazerator.cpp
index a884bbd..6a0d1aa 100644
--- a/src/mazerator.cpp
+++ b/src/mazerator.cpp
@@ -16,6 +16,8 @@ constexpr unsigned int DEFAULT_MAZE_HEIGHT = 20U;
constexpr std::string_view DEFAULT_MAZE_WALL = "█";
+namespace
+{
void optarg_error(int arg, const std::string &error)
{
std::cout << "Error: Invalid option argument for -" << arg << ". " << error
@@ -46,6 +48,7 @@ void parse_uint_arg(unsigned int *num_dst, int arg, bool check_zero = false)
optarg_error(arg, std::string(error));
}
}
+} // namespace
const std::array<option, 8> options = {
option({"width", required_argument, nullptr, 'w'}),
@@ -149,6 +152,8 @@ int main(int argc, char *argv[])
<< std::endl;
return EXIT_FAILURE;
}
+ default:
+ abort();
}
}