Commit 2f551e2ef6c9065e6f4bb418dc426444cb09f724

Authored by Henry Fredrick Schreiner
Committed by Henry Schreiner
1 parent 411364a5

Fix for GCC 8 warning

README.md
@@ -13,9 +13,9 @@ @@ -13,9 +13,9 @@
13 [![Conan.io][conan-badge]][conan-link] 13 [![Conan.io][conan-badge]][conan-link]
14 [![Try CLI11 1.6 online][wandbox-badge]][wandbox-link] 14 [![Try CLI11 1.6 online][wandbox-badge]][wandbox-link]
15 15
  16 +[What's new](./CHANGELOG.md) •
16 [Documentation][gitbook] • 17 [Documentation][gitbook] •
17 -[API Reference][api-docs] •  
18 -[What's new](./CHANGELOG.md) 18 +[API Reference][api-docs]
19 19
20 CLI11 is a command line parser for C++11 and beyond that provides a rich feature set with a simple and intuitive interface. 20 CLI11 is a command line parser for C++11 and beyond that provides a rich feature set with a simple and intuitive interface.
21 21
include/CLI/StringTools.hpp
@@ -243,7 +243,7 @@ inline size_t escape_detect(std::string &str, size_t offset) { @@ -243,7 +243,7 @@ inline size_t escape_detect(std::string &str, size_t offset) {
243 if((next == '\"') || (next == '\'') || (next == '`')) { 243 if((next == '\"') || (next == '\'') || (next == '`')) {
244 auto astart = str.find_last_of("-/ \"\'`", offset - 1); 244 auto astart = str.find_last_of("-/ \"\'`", offset - 1);
245 if(astart != std::string::npos) { 245 if(astart != std::string::npos) {
246 - if(str[astart] == (str[offset] == '=') ? '-' : '/') 246 + if(str[astart] == ((str[offset] == '=') ? '-' : '/'))
247 str[offset] = ' '; // interpret this as a space so the split_up works properly 247 str[offset] = ' '; // interpret this as a space so the split_up works properly
248 } 248 }
249 } 249 }