Skip to content

Commit a97a76f

Browse files
committed
approach 4
1 parent b87d70d commit a97a76f

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

Diff for: include/boost/json/detail/digest.hpp

+3-6
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,9 @@ digest(
4444
hash = (batch ^ hash) * prime;
4545
}
4646

47-
if(n)
48-
{
49-
std::size_t batch = 0;
50-
std::memcpy(&batch, s, n);
51-
hash = (batch ^ hash) * prime;
52-
}
47+
std::size_t batch = 0;
48+
std::memcpy(&batch, s, n);
49+
hash = (batch ^ hash) * prime;
5350

5451
return hash;
5552
}

0 commit comments

Comments
 (0)