Skip to content

Commit

Permalink
refator(discoverysrv): make boost::program_options namespace alias gl…
Browse files Browse the repository at this point in the history
…obal
  • Loading branch information
hparzych committed Oct 10, 2023
1 parent 81494d4 commit 07a9faf
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions ebpfdiscoverysrv/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
#include <sstream>
#include <unistd.h>

namespace po = boost::program_options;
using logging::LogLevel;

enum class ProgramStatus {
Running,
UnixShutdownSignalReceived,
Expand All @@ -26,10 +29,7 @@ std::mutex programStatusMutex;
* CLI options
*/

using logging::LogLevel;

static boost::program_options::options_description getProgramOptions() {
namespace po = boost::program_options;
static po::options_description getProgramOptions() {
po::options_description desc{"Options"};

// clang-format off
Expand All @@ -40,8 +40,8 @@ static boost::program_options::options_description getProgramOptions() {
("log-no-stdout", po::value<bool>()->default_value(false), "Disable logging to stdout")
("version", "Display program version")
;

// clang-format on

return desc;
}

Expand Down Expand Up @@ -115,7 +115,6 @@ static void setupLibbpf() {
}

int main(int argc, char** argv) {
namespace po = boost::program_options;
po::options_description desc{getProgramOptions()};
po::variables_map vm;

Expand Down

0 comments on commit 07a9faf

Please sign in to comment.