We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d1fcec8 commit 122179aCopy full SHA for 122179a
1 file changed
include/cereal/archives/json.hpp
@@ -539,13 +539,11 @@ namespace cereal
539
/*! @throws Exception if no such named node exists */
540
inline void search( const char * searchName )
541
{
542
- const auto len = std::strlen( searchName );
543
size_t index = 0;
544
for( auto it = itsMemberItBegin; it != itsMemberItEnd; ++it, ++index )
545
546
const auto currentName = it->name.GetString();
547
- if( ( std::strncmp( searchName, currentName, len ) == 0 ) &&
548
- ( std::strlen( currentName ) == len ) )
+ if( std::strcmp( searchName, currentName, len ) == 0 )
549
550
itsIndex = index;
551
return;
0 commit comments