From 3ab07fe8c15620291cb45cca74275546f5e876db Mon Sep 17 00:00:00 2001 From: XMRig Date: Sat, 4 Sep 2021 21:10:28 +0700 Subject: [PATCH] Rename App to MinerApp. --- CMakeLists.txt | 4 ++-- src/{App.cpp => MinerApp.cpp} | 14 +++++++------- src/{App.h => MinerApp.h} | 14 +++++++------- src/xmrig.cpp | 4 ++-- 4 files changed, 18 insertions(+), 18 deletions(-) rename src/{App.cpp => MinerApp.cpp} (92%) rename src/{App.h => MinerApp.h} (89%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 10fbdf86..fd47e529 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -50,7 +50,6 @@ include(src/backend/backend.cmake) set(HEADERS "${HEADERS_BACKEND}" - src/App.h src/backend/common/interfaces/IMemoryPool.h src/core/config/Config_default.h src/core/config/Config_platform.h @@ -79,6 +78,7 @@ set(HEADERS src/crypto/common/Nonce.h src/crypto/common/portable/mm_malloc.h src/crypto/common/VirtualMemory.h + src/MinerApp.h src/net/interfaces/IJobResultListener.h src/net/JobResult.h src/net/JobResults.h @@ -96,7 +96,6 @@ endif() set(SOURCES "${SOURCES_BACKEND}" - src/App.cpp src/core/config/Config.cpp src/core/config/ConfigTransform.cpp src/core/Controller.cpp @@ -111,6 +110,7 @@ set(SOURCES src/crypto/common/MemoryPool.cpp src/crypto/common/Nonce.cpp src/crypto/common/VirtualMemory.cpp + src/MinerApp.cpp src/net/JobResults.cpp src/net/Network.cpp src/net/strategies/DonateStrategy.cpp diff --git a/src/App.cpp b/src/MinerApp.cpp similarity index 92% rename from src/App.cpp rename to src/MinerApp.cpp index 0956a32d..6dafe82a 100644 --- a/src/App.cpp +++ b/src/MinerApp.cpp @@ -28,7 +28,7 @@ #include -#include "App.h" +#include "MinerApp.h" #include "backend/cpu/Cpu.h" #include "base/io/Console.h" #include "base/io/log/Log.h" @@ -41,19 +41,19 @@ #include "version.h" -xmrig::App::App() +xmrig::MinerApp::MinerApp() { m_controller = std::make_shared(); } -xmrig::App::~App() +xmrig::MinerApp::~MinerApp() { Cpu::release(); } -int xmrig::App::exec() +int xmrig::MinerApp::exec() { if (!m_controller->isReady()) { LOG_EMERG("no valid configuration found, try https://xmrig.com/wizard"); @@ -89,7 +89,7 @@ int xmrig::App::exec() } -void xmrig::App::onConsoleCommand(char command) +void xmrig::MinerApp::onConsoleCommand(char command) { if (command == 3) { LOG_WARN("%s " YELLOW("Ctrl+C received, exiting"), Tags::signal()); @@ -101,7 +101,7 @@ void xmrig::App::onConsoleCommand(char command) } -void xmrig::App::onSignal(int signum) +void xmrig::MinerApp::onSignal(int signum) { switch (signum) { @@ -116,7 +116,7 @@ void xmrig::App::onSignal(int signum) } -void xmrig::App::close() +void xmrig::MinerApp::close() { m_signals.reset(); m_console.reset(); diff --git a/src/App.h b/src/MinerApp.h similarity index 89% rename from src/App.h rename to src/MinerApp.h index baa43536..94e21513 100644 --- a/src/App.h +++ b/src/MinerApp.h @@ -23,8 +23,8 @@ * along with this program. If not, see . */ -#ifndef XMRIG_APP_H -#define XMRIG_APP_H +#ifndef XMRIG_MINERAPP_H +#define XMRIG_MINERAPP_H #include "base/kernel/interfaces/IConsoleListener.h" @@ -45,13 +45,13 @@ class Process; class Signals; -class App : public IConsoleListener, public ISignalListener +class MinerApp : public IConsoleListener, public ISignalListener { public: - XMRIG_DISABLE_COPY_MOVE(App) + XMRIG_DISABLE_COPY_MOVE(MinerApp) - App(); - ~App() override; + MinerApp(); + ~MinerApp() override; int exec(); @@ -72,4 +72,4 @@ private: } /* namespace xmrig */ -#endif /* XMRIG_APP_H */ +#endif /* XMRIG_MINERAPP_H */ diff --git a/src/xmrig.cpp b/src/xmrig.cpp index ff1eb24d..a93eda02 100644 --- a/src/xmrig.cpp +++ b/src/xmrig.cpp @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -#include "App.h" +#include "MinerApp.h" #include "base/kernel/Entry.h" #include "base/kernel/Process.h" #include "core/config/usage.h" @@ -46,7 +46,7 @@ int main(int argc, char **argv) } } - App app; + MinerApp app; return app.exec(); }