From 73a241079a040710481e9b840248ec0425e46c7c Mon Sep 17 00:00:00 2001 From: Serge Lamikhov-Center Date: Mon, 28 Aug 2023 19:35:05 +0300 Subject: [PATCH] Refactor the last commit --- elfio/elfio_utils.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elfio/elfio_utils.hpp b/elfio/elfio_utils.hpp index bd6cca8..ae5c24a 100644 --- a/elfio/elfio_utils.hpp +++ b/elfio/elfio_utils.hpp @@ -263,7 +263,7 @@ inline void adjust_stream_size( std::ostream& stream, std::streamsize offset ) //------------------------------------------------------------------------------ inline static size_t strnlength( const char* s, size_t n ) { - const char* found = (const char*)std::memchr( s, '\0', n ); + auto found = (const char*)std::memchr( s, '\0', n ); return found ? (size_t)( found - s ) : n; }