From 9a29ea0e1c70d595ed7022a575cef642878ee270 Mon Sep 17 00:00:00 2001 From: Kp Date: Mon, 12 Oct 2020 03:28:26 +0000 Subject: [PATCH] Fold check_partial_range into its sole caller --- common/include/partial_range.h | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/common/include/partial_range.h b/common/include/partial_range.h index 54ff4fb57..c8243bc61 100644 --- a/common/include/partial_range.h +++ b/common/include/partial_range.h @@ -212,12 +212,6 @@ inline void check_range_bounds(const char *file, unsigned line, const char *estr #undef PARTIAL_RANGE_COMPILE_CHECK_BOUND } -template -inline void check_partial_range(const char *file, unsigned line, const char *estr, const T &t, const std::size_t o, const std::size_t l) -{ - check_range_bounds(file, line, estr, std::addressof(t), o, l, std::size(t)); -} - #ifdef DXX_HAVE_BUILTIN_OBJECT_SIZE template inline void check_range_object_size(const char *file, unsigned line, const char *estr, P &ref, const std::size_t o, const std::size_t l) @@ -303,7 +297,7 @@ template (partial_range)(const char (&file)[NF], unsigned line, const char (&estr)[NE], T &t, const UO &o, const UL &l) { - partial_range_detail::check_partial_range::partial_range_error, partial_range_detail::required_buffer_size, T>(file, line, estr, t, o, l); + partial_range_detail::check_range_bounds::partial_range_error, partial_range_detail::required_buffer_size>(file, line, estr, std::addressof(t), o, l, std::size(t)); return unchecked_partial_range(file, line, estr, std::begin(t), o, l); }