Commit bef3e67cb8fd01127964826d2078ea057c7dd5c5
1 parent
7b26c50e
Fix uninitialised m_next_positional
This fixes the runtime error in Travis Job 17.2. The variable Options::m_next_positional was not initialised when no positional parameters were set.
Showing
1 changed file
with
1 additions
and
0 deletions
src/cxxopts.hpp
| @@ -666,6 +666,7 @@ namespace cxxopts | @@ -666,6 +666,7 @@ namespace cxxopts | ||
| 666 | Options(std::string program, std::string help_string = "") | 666 | Options(std::string program, std::string help_string = "") |
| 667 | : m_program(std::move(program)) | 667 | : m_program(std::move(program)) |
| 668 | , m_help_string(toLocalString(std::move(help_string))) | 668 | , m_help_string(toLocalString(std::move(help_string))) |
| 669 | + , m_next_positional(m_positional.end()) | ||
| 669 | { | 670 | { |
| 670 | } | 671 | } |
| 671 | 672 |