Merge bitcoin/bitcoin#29085: refactor: C++20: Use std::rotl

6044628543 crypto, hash: replace custom rotl32 with std::rotl (Fabian Jahr)

Pull request description:

  While exploring some C++20 changes and checking against our code I found this potential improvement:

  1. We can replace our custom implementation of `rotl32` in crypto/chacha20 with `std::rotl` from the [new `bit` header](https://en.cppreference.com/w/cpp/header/bit).

ACKs for top commit:
  fanquake:
    ACK 6044628543

Tree-SHA512: db55b366f20fca2ef62e5f10a838f8a709d531678c35c1dba20898754029c788a2fd47995208ed6d187cf814109a7ca397bc2c301504500aee79da04c95d6895
This commit is contained in:
fanquake
2024-01-18 09:35:36 +00:00
5 changed files with 46 additions and 57 deletions

View File

@@ -69,7 +69,6 @@ implicit-signed-integer-truncation:crypto/
implicit-unsigned-integer-truncation:crypto/
shift-base:arith_uint256.cpp
shift-base:crypto/
shift-base:ROTL32
shift-base:streams.h
shift-base:FormatHDKeypath
shift-base:xoroshiro128plusplus.h