mirror of
https://github.com/jarro2783/cxxopts.git
synced 2026-08-29 09:31:15 +02:00
Enable warnings and fix them
Fixes #50. This enables -Wall -Wextra -Wshadow and sets -Werror so that the build fails if there are any warnings. All warnings that came up are also fixed
This commit is contained in:
+5
-5
@@ -7,13 +7,13 @@
|
||||
class Argv {
|
||||
public:
|
||||
|
||||
Argv(std::initializer_list<const char*> argv)
|
||||
: m_argv(new char*[argv.size()])
|
||||
, m_argc(argv.size())
|
||||
Argv(std::initializer_list<const char*> args)
|
||||
: m_argv(new char*[args.size()])
|
||||
, m_argc(args.size())
|
||||
{
|
||||
int i = 0;
|
||||
auto iter = argv.begin();
|
||||
while (iter != argv.end()) {
|
||||
auto iter = args.begin();
|
||||
while (iter != args.end()) {
|
||||
auto len = strlen(*iter) + 1;
|
||||
auto ptr = std::unique_ptr<char[]>(new char[len]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user