Removed IConfigCreator/ConfigCreator and changed file structure.
This commit is contained in:
parent
d8aba7da7d
commit
e39ddeeea2
24 changed files with 36 additions and 139 deletions
|
@ -1,50 +0,0 @@
|
|||
/* XMRig
|
||||
* Copyright 2010 Jeff Garzik <jgarzik@pobox.com>
|
||||
* Copyright 2012-2014 pooler <pooler@litecoinpool.org>
|
||||
* Copyright 2014 Lucas Jones <https://github.com/lucasjones>
|
||||
* Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet>
|
||||
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
|
||||
* Copyright 2016-2018 XMRig <support@xmrig.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __CONFIGCREATOR_H__
|
||||
#define __CONFIGCREATOR_H__
|
||||
|
||||
|
||||
#include "common/interfaces/IConfigCreator.h"
|
||||
#include "core/Config.h"
|
||||
|
||||
|
||||
namespace xmrig {
|
||||
|
||||
|
||||
class IConfig;
|
||||
|
||||
|
||||
class ConfigCreator : public IConfigCreator
|
||||
{
|
||||
public:
|
||||
inline IConfig *create() const override
|
||||
{
|
||||
return new Config();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
} /* namespace xmrig */
|
||||
|
||||
|
||||
#endif // __CONFIGCREATOR_H__
|
|
@ -33,7 +33,7 @@
|
|||
#include "common/config/ConfigLoader.h"
|
||||
#include "common/cpu/Cpu.h"
|
||||
#include "common/Platform.h"
|
||||
#include "core/Config.h"
|
||||
#include "core/config/Config.h"
|
||||
#include "core/Controller.h"
|
||||
#include "net/Network.h"
|
||||
|
||||
|
|
|
@ -30,8 +30,7 @@
|
|||
#include "base/io/log/Log.h"
|
||||
#include "common/config/ConfigLoader.h"
|
||||
#include "common/cpu/Cpu.h"
|
||||
#include "core/Config.h"
|
||||
#include "core/ConfigCreator.h"
|
||||
#include "core/config/Config.h"
|
||||
#include "crypto/Asm.h"
|
||||
#include "crypto/CryptoNight_constants.h"
|
||||
#include "rapidjson/document.h"
|
||||
|
@ -129,7 +128,7 @@ void xmrig::Config::getJSON(rapidjson::Document &doc) const
|
|||
|
||||
xmrig::Config *xmrig::Config::load(Process *process, IConfigListener *listener)
|
||||
{
|
||||
return static_cast<Config*>(ConfigLoader::load(process, new ConfigCreator(), listener));
|
||||
return static_cast<Config*>(ConfigLoader::load(process, listener));
|
||||
}
|
||||
|
||||
|
|
@ -78,8 +78,9 @@ public:
|
|||
inline bool isShouldSave() const { return (m_shouldSave || m_upgrade) && isAutoSave(); }
|
||||
inline const std::vector<IThread *> &threads() const { return m_threads.list; }
|
||||
inline int priority() const { return m_priority; }
|
||||
inline int threadsCount() const { return m_threads.list.size(); }
|
||||
inline int threadsCount() const { return static_cast<int>(m_threads.list.size()); }
|
||||
inline int64_t affinity() const { return m_threads.mask; }
|
||||
inline static IConfig *create() { return new Config(); }
|
||||
inline ThreadsMode threadsMode() const { return m_threads.mode; }
|
||||
|
||||
static Config *load(Process *process, IConfigListener *listener);
|
Loading…
Add table
Add a link
Reference in a new issue