From 42bb42380a1e6991e43ba1b7ffcd8bb0ac85285c Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Tue, 30 Jan 2018 07:09:14 +0000 Subject: [PATCH] Remove the unused debug option. --- YSFParrot/YSFParrot.cpp | 21 +++++---------------- YSFParrot/YSFParrot.h | 3 +-- 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/YSFParrot/YSFParrot.cpp b/YSFParrot/YSFParrot.cpp index 1062bfd..437e06f 100644 --- a/YSFParrot/YSFParrot.cpp +++ b/YSFParrot/YSFParrot.cpp @@ -35,31 +35,20 @@ int main(int argc, char** argv) return 1; } - int n = 1U; - - bool debug = false; - - for (; n < argc-1; n++) { - if (::strcmp(argv[n], "-d") == 0 || ::strcmp(argv[n], "--debug") == 0) { - debug = true; - } - } - - unsigned int port = ::atoi(argv[n]); + unsigned int port = ::atoi(argv[1U]); if (port == 0U) { - ::fprintf(stderr, "YSFParrot: invalid port number - %s\n", argv[n]); + ::fprintf(stderr, "YSFParrot: invalid port number - %s\n", argv[1U]); return 1; } - CYSFParrot parrot(port, debug); + CYSFParrot parrot(port); parrot.run(); return 0; } -CYSFParrot::CYSFParrot(unsigned int port, bool debug) : -m_port(port), -m_debug(debug) +CYSFParrot::CYSFParrot(unsigned int port) : +m_port(port) { } diff --git a/YSFParrot/YSFParrot.h b/YSFParrot/YSFParrot.h index 343822f..930b456 100644 --- a/YSFParrot/YSFParrot.h +++ b/YSFParrot/YSFParrot.h @@ -22,14 +22,13 @@ class CYSFParrot { public: - CYSFParrot(unsigned int port, bool debug); + CYSFParrot(unsigned int port); ~CYSFParrot(); void run(); private: unsigned int m_port; - bool m_debug; }; #endif