Skip to content

Commit

Permalink
Have cooling-type use the common argument.hpp
Browse files Browse the repository at this point in the history
The cooling-type application should use the common
header file for the ArgumentParser class now that one
is available.

Also fixed where a static ArgumentParser constant was
being initialized.

Change-Id: I1fb0dfe3bd0c6e0200ad7c718ef2a3def5476f3f
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
  • Loading branch information
spinler committed May 24, 2017
1 parent 07710ef commit 06bae85
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 44 deletions.
2 changes: 1 addition & 1 deletion argument.hpp
Expand Up @@ -30,7 +30,7 @@ class ArgumentParser

static void usage(char** argv);

static constexpr auto true_string = "true";
static const std::string true_string;
static const std::string empty_string;

private:
Expand Down
1 change: 1 addition & 0 deletions control/argument.cpp
Expand Up @@ -82,6 +82,7 @@ const option ArgumentParser::options[] =

const char* ArgumentParser::optionstr = "ich?";

const std::string ArgumentParser::true_string = "true";
const std::string ArgumentParser::empty_string = "";

}
Expand Down
5 changes: 3 additions & 2 deletions cooling-type/argument.cpp
Expand Up @@ -21,9 +21,9 @@

namespace phosphor
{
namespace cooling
namespace fan
{
namespace type
namespace util
{

ArgumentParser::ArgumentParser(int argc, char** argv)
Expand Down Expand Up @@ -99,6 +99,7 @@ const option ArgumentParser::options[] =

const char* ArgumentParser::optionstr = "p:d:e:aw?h";

const std::string ArgumentParser::true_string = "true";
const std::string ArgumentParser::empty_string = "";

}
Expand Down
41 changes: 0 additions & 41 deletions cooling-type/argument.hpp

This file was deleted.

1 change: 1 addition & 0 deletions cooling-type/main.cpp
Expand Up @@ -6,6 +6,7 @@
#include "cooling_type.hpp"

using namespace phosphor::cooling::type;
using namespace phosphor::fan::util;
using namespace phosphor::logging;

int main(int argc, char* argv[])
Expand Down

0 comments on commit 06bae85

Please sign in to comment.