util:: remove unused funtion base_name (#22759)

old-commit-hash: 8da3cd3cdd
commatwo_master
Dean Lee 4 years ago committed by GitHub
parent 9fcb713e9c
commit a602b4a1a0
  1. 6
      selfdrive/common/util.cc
  2. 1
      selfdrive/common/util.h

@ -212,12 +212,6 @@ std::string hexdump(const std::string& in) {
return ss.str(); return ss.str();
} }
std::string base_name(std::string const &path) {
size_t pos = path.find_last_of("/");
if (pos == std::string::npos) return path;
return path.substr(pos + 1);
}
std::string dir_name(std::string const &path) { std::string dir_name(std::string const &path) {
size_t pos = path.find_last_of("/"); size_t pos = path.find_last_of("/");
if (pos == std::string::npos) return ""; if (pos == std::string::npos) return "";

@ -68,7 +68,6 @@ float getenv(const char* key, float default_val);
std::string tohex(const uint8_t* buf, size_t buf_size); std::string tohex(const uint8_t* buf, size_t buf_size);
std::string hexdump(const std::string& in); std::string hexdump(const std::string& in);
std::string base_name(std::string const& path);
std::string dir_name(std::string const& path); std::string dir_name(std::string const& path);
// **** file fhelpers ***** // **** file fhelpers *****

Loading…
Cancel
Save