From 16b14d091b72dceeee5bac0b9c63ea62f1e00d77 Mon Sep 17 00:00:00 2001 From: Sude Date: Thu, 3 Sep 2015 12:42:00 +0300 Subject: [PATCH] Simplify "all" value calculation to make it easier to understand No idea why I was shifting 2 instead of 1 here. --- src/util.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util.cpp b/src/util.cpp index 54f0d2e..0accd6e 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -432,7 +432,7 @@ unsigned int Util::getOptionValue(const std::string& str, const std::vector what; if (str == "all") { - value = (2 << (options.size() - 1)) - 1; + value = (1 << options.size()) - 1; } else if (boost::regex_search(str, what, expression)) {