From a8144d971dcc3b0cd662e4819e9c16fff88bca01 Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Tue, 21 Jun 2022 16:15:58 -0700 Subject: [PATCH] Resolve clang-tidy error. --- include/pybind11/cast.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/pybind11/cast.h b/include/pybind11/cast.h index b4f94db17..841d7d986 100644 --- a/include/pybind11/cast.h +++ b/include/pybind11/cast.h @@ -69,7 +69,7 @@ inline const char *cpp_version_in_use() { inline const char *source_file_line_basename(const char *sfl) { unsigned i_sep = 0; - for (unsigned i = 0; sfl[i]; i++) { + for (unsigned i = 0; sfl[i] != '\0'; i++) { if (sfl[i] == '/' || sfl[i] == '\\') { i_sep = i; }