From 79c0bfcb2283d1a7665290a9a2074d0205c77fdc Mon Sep 17 00:00:00 2001 From: Henri Nurmi Date: Sun, 10 Dec 2023 07:42:27 +0200 Subject: [PATCH] cxxrtl: Remove unnecessary length check --- backends/cxxrtl/cxxrtl_backend.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backends/cxxrtl/cxxrtl_backend.cc b/backends/cxxrtl/cxxrtl_backend.cc index ef276d9a5..ab4456bba 100644 --- a/backends/cxxrtl/cxxrtl_backend.cc +++ b/backends/cxxrtl/cxxrtl_backend.cc @@ -636,7 +636,7 @@ std::string basename(const std::string &filepath) const std::string dir_seps = "\\/"; #endif size_t sep_pos = filepath.find_last_of(dir_seps); - if (sep_pos != std::string::npos && sep_pos + 1 < filepath.length()) { + if (sep_pos != std::string::npos) { return filepath.substr(sep_pos + 1); } else {