mirror of
https://github.com/serge1/ELFIO.git
synced 2025-04-25 03:02:46 +00:00
Refactor the last commit
This commit is contained in:
parent
089160c40e
commit
73a241079a
@ -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 )
|
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;
|
return found ? (size_t)( found - s ) : n;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user