params: cleanup constructor (#25834)

pull/25838/head
Dean Lee 3 years ago committed by GitHub
parent e4612ac4c4
commit 583304fc7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      common/params.cc

@ -198,10 +198,8 @@ std::unordered_map<std::string, uint32_t> keys = {
Params::Params(const std::string &path) { Params::Params(const std::string &path) {
const char* env = std::getenv("OPENPILOT_PREFIX"); prefix = "/" + util::getenv("OPENPILOT_PREFIX", "d");
prefix = env ? "/" + std::string(env) : "/d"; params_path = ensure_params_path(prefix, path);
std::string default_param_path = ensure_params_path(prefix);
params_path = path.empty() ? default_param_path : ensure_params_path(prefix, path);
} }
std::vector<std::string> Params::allKeys() const { std::vector<std::string> Params::allKeys() const {

Loading…
Cancel
Save