mirror of
https://github.com/MoreTore/openpilot.git
synced 2026-10-01 03:43:51 +08:00
params: remove persistent params (#21975)
* cleanup constructors
* remove persistent_param
* remove test_persist_params_put_and_get
old-commit-hash: 3b752a307f
This commit is contained in:
@@ -228,15 +228,13 @@ std::unordered_map<std::string, uint32_t> keys = {
|
||||
|
||||
} // namespace
|
||||
|
||||
Params::Params(bool persistent_param) : Params(persistent_param ? Path::persistent_params() : Path::params()) {}
|
||||
Params::Params() : params_path(Path::params()) {
|
||||
static std::once_flag once_flag;
|
||||
std::call_once(once_flag, ensure_params_path, params_path);
|
||||
}
|
||||
|
||||
std::once_flag default_params_path_ensured;
|
||||
Params::Params(const std::string &path) : params_path(path) {
|
||||
if (path == Path::params()) {
|
||||
std::call_once(default_params_path_ensured, ensure_params_path, path);
|
||||
} else {
|
||||
ensure_params_path(path);
|
||||
}
|
||||
ensure_params_path(params_path);
|
||||
}
|
||||
|
||||
bool Params::checkKey(const std::string &key) {
|
||||
|
||||
Reference in New Issue
Block a user