mirror of
https://github.com/akuker/RASCSI.git
synced 2025-02-19 08:31:27 +00:00
Ignore unknown parameters and log a warning (#730)
* Ignore unknown parameters and log a warning * Added comment * Updated logging
This commit is contained in:
parent
9099d7249c
commit
f32c20883e
@ -126,7 +126,13 @@ void Device::SetParams(const unordered_map<string, string>& params)
|
||||
this->params = GetDefaultParams();
|
||||
|
||||
for (const auto& param : params) {
|
||||
this->params[param.first] = param.second;
|
||||
// It is assumed that there are default parameters for all supported parameters
|
||||
if (this->params.find(param.first) != this->params.end()) {
|
||||
this->params[param.first] = param.second;
|
||||
}
|
||||
else {
|
||||
LOGWARN("%s", string("Ignored unknown parameter '" + param.first + "'").c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user