forked from MrBesen/lolautoaccept
fixed compile error and warning
This commit is contained in:
parent
03e4017e7f
commit
4fae1740e9
|
@ -75,7 +75,7 @@ Config::RootConfig::RootConfig(const QJsonObject& j) {
|
|||
positionConfigs.reserve(jpos.size());
|
||||
for(QJsonValue val : jpos) {
|
||||
if(val.isObject()) {
|
||||
positionConfigs.emplace_back(val.toObject()); // implicit cast to PositionConfig
|
||||
positionConfigs.push_back(std::make_shared<Config::PositionConfig>(val.toObject())); // implicit cast to PositionConfig
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -204,7 +204,7 @@ std::vector<const DataDragon::ChampData*> DataDragon::getMatchingChamp(const std
|
|||
const DataDragon::ChampData* DataDragon::getChampByID(uint32_t id) {
|
||||
getChamps();
|
||||
|
||||
auto it = std::find_if(champs.begin(), champs.end(), [id](const ChampData& cd) { return cd.key == id; });
|
||||
auto it = std::find_if(champs.begin(), champs.end(), [id](const ChampData& cd) { return cd.key == (int) id; });
|
||||
|
||||
// nothing found
|
||||
if(it == champs.end()) return nullptr;
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
LolAutoAccept::Stage::Stage() {}
|
||||
LolAutoAccept::Stage::~Stage() {}
|
||||
|
||||
LolAutoAccept::LolAutoAccept(Config::RootConfig& config, DataDragon& dd, onfailed_func fail, onposchange_func onposch, onruneschange_func onrunch) : config(config), dd(dd), onFailed(fail), onPoschange(onposch), onRuneschange(onrunch) {
|
||||
LolAutoAccept::LolAutoAccept(Config::RootConfig& config, DataDragon& dd, onfailed_func fail, onposchange_func onposch, onruneschange_func onrunch) : config(config), dd(dd), onPoschange(onposch), onRuneschange(onrunch), onFailed(fail) {
|
||||
std::lock_guard lock(stagesMutex);
|
||||
stages.resize(3); // accept, ban, pick
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue