From 58b10320991b49012cdf7e498889d14f1ca415de Mon Sep 17 00:00:00 2001 From: IgorekLoschinin <igor.loschinin2014@yandex.ru> Date: Thu, 13 May 2021 21:11:41 +0300 Subject: [PATCH] ref #29 Fixing inialization conctructor main class worker. --- src/CopyrighFixer/CopyrighFixer/worker.cpp | 17 +++++++++-------- src/CopyrighFixer/CopyrighFixer/worker.h | 6 +++--- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/CopyrighFixer/CopyrighFixer/worker.cpp b/src/CopyrighFixer/CopyrighFixer/worker.cpp index 37711c2..38d352c 100644 --- a/src/CopyrighFixer/CopyrighFixer/worker.cpp +++ b/src/CopyrighFixer/CopyrighFixer/worker.cpp @@ -7,6 +7,7 @@ #include "config.h" #include "configparser.h" +#include "signer.h" #include "worker.h" #include <quasarapp.h> @@ -14,24 +15,24 @@ namespace CopyrighFixer { Worker::Worker() { - conf_ = new Config; - confParser_ = new ConfigParser; - subscriber_ = new Signer; + _conf = new Config; + _confParser = new ConfigParser; + _subscriber = new Signer; } Worker::~Worker() { - delete conf_; - delete confParser_; - delete subscriber_; + delete _conf; + delete _confParser; + delete _subscriber; } bool Worker::run() { - if (!confParser_->parseOptions(*conf_)) { + if (!_confParser->parseOptions(*_conf)) { return false; } - if (!subscriber_->checkSign(*conf_)) { + if (!_subscriber->checkSign(*_conf)) { return false; } diff --git a/src/CopyrighFixer/CopyrighFixer/worker.h b/src/CopyrighFixer/CopyrighFixer/worker.h index 8ba7666..7bfddfe 100644 --- a/src/CopyrighFixer/CopyrighFixer/worker.h +++ b/src/CopyrighFixer/CopyrighFixer/worker.h @@ -38,9 +38,9 @@ public: void printHelp() const; protected: - Config *conf_ = nullptr; - ConfigParser *confParser_ = nullptr; - Signer *subscriber_ = nullptr; + Config *_conf = nullptr; + ConfigParser *_confParser = nullptr; + Signer *_subscriber = nullptr; };