Restored API.
This commit is contained in:
parent
e39ddeeea2
commit
f8f9d6c0ef
16 changed files with 272 additions and 352 deletions
|
@ -55,7 +55,7 @@ xmrig::Config::Config() : xmrig::CommonConfig(),
|
|||
}
|
||||
|
||||
|
||||
bool xmrig::Config::reload(const char *json)
|
||||
bool xmrig::Config::reload(const rapidjson::Value &json)
|
||||
{
|
||||
return xmrig::ConfigLoader::reload(this, json);
|
||||
}
|
||||
|
@ -277,11 +277,11 @@ bool xmrig::Config::parseUint64(int key, uint64_t arg)
|
|||
}
|
||||
|
||||
|
||||
void xmrig::Config::parseJSON(const rapidjson::Document &doc)
|
||||
void xmrig::Config::parseJSON(const rapidjson::Value &json)
|
||||
{
|
||||
CommonConfig::parseJSON(doc);
|
||||
CommonConfig::parseJSON(json);
|
||||
|
||||
const rapidjson::Value &threads = doc["threads"];
|
||||
const rapidjson::Value &threads = json["threads"];
|
||||
|
||||
if (threads.IsArray()) {
|
||||
for (const rapidjson::Value &value : threads.GetArray()) {
|
||||
|
|
|
@ -67,7 +67,7 @@ public:
|
|||
|
||||
Config();
|
||||
|
||||
bool reload(const char *json);
|
||||
bool reload(const rapidjson::Value &json);
|
||||
|
||||
void getJSON(rapidjson::Document &doc) const override;
|
||||
|
||||
|
@ -90,7 +90,7 @@ protected:
|
|||
bool parseBoolean(int key, bool enable) override;
|
||||
bool parseString(int key, const char *arg) override;
|
||||
bool parseUint64(int key, uint64_t arg) override;
|
||||
void parseJSON(const rapidjson::Document &doc) override;
|
||||
void parseJSON(const rapidjson::Value &json) override;
|
||||
|
||||
private:
|
||||
bool parseInt(int key, int arg);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue