Start cleanup

dependabot/npm_and_yarn/Src/WebController/UI/websocket-extensions-0.1.4
Grzegorz Rychlik 2019-11-07 11:40:05 +01:00
parent 0a1939a6cd
commit 5d237e0f9b
4 changed files with 4 additions and 18 deletions

View File

@ -25,12 +25,12 @@ namespace MWR::C3::Linter
AppConfig::AppConfig(int argc, char** argv) : m_ArgParser()
{
AddOptions();
ConfigureParser();
m_ArgParser.parse(argc, argv);
m_Config = CreateConfig(m_ArgParser);
}
void AppConfig::AddOptions()
void AppConfig::ConfigureParser()
{
m_ArgParser.addArgument("-n", "--name", 1, false);
m_ArgParser.addArgument("-a", "--args", '*', false);

View File

@ -1,6 +1,4 @@
#pragma once
#include "argparse.hpp"
#include <optional>
namespace MWR::C3::Linter
{
@ -25,7 +23,7 @@ namespace MWR::C3::Linter
Config const& GetConfig() const { return m_Config; }
private:
void AddOptions();
void ConfigureParser();
argparse::ArgumentParser m_ArgParser;
Config m_Config;
};

View File

@ -3,13 +3,6 @@
namespace MWR::C3::Linter
{
void OutputDebug(std::string_view output)
{
#ifdef _DEBUG
std::cout << output << std::endl;
#endif // _DEBUG
}
/// @throws std::runtime_error if channel with given name was not registered
auto const& GetChannelInfo(std::string_view channelName)
{
@ -44,12 +37,6 @@ namespace MWR::C3::Linter
}
}
#ifdef _DEBUG
#define DebugDump(x) MWR::C3::Linter::OutputDebug(x)
#else
#define DebugDump(x)
#endif // _DEBUG
/// Entry point of the application.
/// @param argc number of program arguments.
/// @param argv vector of program arguments.

View File

@ -17,6 +17,7 @@ using json = nlohmann::json;
#include "Common/CppCodec/base64_default_rfc4648.hpp"
#include "argparse.hpp"
#include "AppConfig.h"
#include "InputVector.h"
#include "FormElement.hpp"