From 4b6d3b87a7179e03df32eb56fd38adc480ffc2bb Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Tue, 28 Jun 2022 08:56:54 -0700 Subject: [PATCH] clang-tidy suggested fixes --- include/pybind11/detail/type_caster_odr_guard.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/pybind11/detail/type_caster_odr_guard.h b/include/pybind11/detail/type_caster_odr_guard.h index 28f8bdd19..090c3ee75 100644 --- a/include/pybind11/detail/type_caster_odr_guard.h +++ b/include/pybind11/detail/type_caster_odr_guard.h @@ -124,10 +124,10 @@ namespace { template struct tu_local_descr { - char text[N + 1]; + char text[N + 1]{'\0'}; src_loc sloc; - constexpr tu_local_descr(src_loc sloc = src_loc::here()) : text{'\0'}, sloc(sloc){}; + explicit constexpr tu_local_descr(src_loc sloc = src_loc::here()) : sloc(sloc) {} // NOLINTNEXTLINE(google-explicit-constructor) constexpr tu_local_descr(char const (&s)[N + 1], src_loc sloc = src_loc::here()) : tu_local_descr(s, make_index_sequence(), sloc) {}