From 01d6c530a02bce5289830d62b32026af3d3554f3 Mon Sep 17 00:00:00 2001 From: Matthias Kruk Date: Fri, 12 Aug 2022 01:38:04 +0900 Subject: [PATCH] include/opt: Remove unused variable __opt_num The opt module counts the number of options that were defined, but the count is never used. This commit removes the unused variable. --- include/opt.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/include/opt.sh b/include/opt.sh index e508575..0cddf5e 100644 --- a/include/opt.sh +++ b/include/opt.sh @@ -1,7 +1,7 @@ #!/bin/bash # opt.sh - Toolbox commandline parser module -# Copyright (C) 2021 Matthias Kruk +# Copyright (C) 2021-2022 Matthias Kruk # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -33,7 +33,6 @@ __init() { declare -Axg __opt_regex declare -Axg __opt_action declare -Axg __opt_map - declare -xgi __opt_num=0 opt_add_arg "h" "help" "" 0 \ "Print this text" \ @@ -116,8 +115,6 @@ opt_add_arg() { __opt_default["$long"]="$default" fi - ((__opt_num++)) - return 0 } -- 2.47.3