From a602b4a1a0dcffb00e9f9981c823fc2851e6a203 Mon Sep 17 00:00:00 2001 From: Dean Lee Date: Mon, 1 Nov 2021 04:10:27 +0800 Subject: [PATCH] util:: remove unused funtion base_name (#22759) old-commit-hash: 8da3cd3cdd6fdf82960f393c79db6ce5098b3f44 --- selfdrive/common/util.cc | 6 ------ selfdrive/common/util.h | 1 - 2 files changed, 7 deletions(-) diff --git a/selfdrive/common/util.cc b/selfdrive/common/util.cc index 3623ac70cc..40f6566969 100644 --- a/selfdrive/common/util.cc +++ b/selfdrive/common/util.cc @@ -212,12 +212,6 @@ std::string hexdump(const std::string& in) { 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) { size_t pos = path.find_last_of("/"); if (pos == std::string::npos) return ""; diff --git a/selfdrive/common/util.h b/selfdrive/common/util.h index 5df271df67..80f8b0ae7e 100644 --- a/selfdrive/common/util.h +++ b/selfdrive/common/util.h @@ -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 hexdump(const std::string& in); -std::string base_name(std::string const& path); std::string dir_name(std::string const& path); // **** file fhelpers *****