@@ -537,10 +537,8 @@ class xxh3_128
537537
538538private: // supporting constructor for the static factory functions
539539
540- BOOST_CXX14_CONSTEXPR xxh3_128 ( std::uint64_t seed, unsigned char const * p, std::size_t n ): seed_( seed )
540+ BOOST_CXX14_CONSTEXPR xxh3_128 ( std::uint64_t seed, unsigned char const * p, std::size_t n, bool with_secret ): seed_( seed ), with_secret_( with_secret )
541541 {
542- with_secret_ = true ;
543-
544542 if ( n < min_secret_len )
545543 {
546544 // this is a precondition violation for XXH3, but we try to do something reasonable
@@ -612,7 +610,7 @@ class xxh3_128
612610
613611 static BOOST_CXX14_CONSTEXPR xxh3_128 with_secret ( unsigned char const * p, std::size_t n )
614612 {
615- return xxh3_128 ( 0 , p, n );
613+ return xxh3_128 ( 0 , p, n, true );
616614 }
617615
618616 static xxh3_128 with_secret ( void const * p, std::size_t n )
@@ -622,11 +620,7 @@ class xxh3_128
622620
623621 static BOOST_CXX14_CONSTEXPR xxh3_128 with_secret_and_seed ( unsigned char const * p, std::size_t n, std::uint64_t seed )
624622 {
625- xxh3_128 r ( seed, p, n );
626-
627- r.with_secret_ = false ;
628-
629- return r;
623+ return xxh3_128 ( seed, p, n, false );
630624 }
631625
632626 static xxh3_128 with_secret_and_seed ( void const * p, std::size_t n, std::uint64_t seed )
0 commit comments