diff options
| author | levlam <levlam@telegram.org> | 2025-02-24 14:39:41 +0300 |
|---|---|---|
| committer | levlam <levlam@telegram.org> | 2025-02-24 14:39:41 +0300 |
| commit | d2af5b598b6726d4d908a0fd88720ebd5099177d (patch) | |
| tree | 25886f8ad1c9c31883c9a1f34343d2c8e72da554 /benchmark | |
| parent | 9919ff3e11848e9b42f04b9dd81b0fa3fda0e010 (diff) | |
Improve types of some constants.
Diffstat (limited to 'benchmark')
| -rw-r--r-- | benchmark/bench_crypto.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/benchmark/bench_crypto.cpp b/benchmark/bench_crypto.cpp index 115d64895..8eae71394 100644 --- a/benchmark/bench_crypto.cpp +++ b/benchmark/bench_crypto.cpp @@ -27,8 +27,8 @@ #include <string> #include <vector> -static constexpr int DATA_SIZE = 8 << 10; -static constexpr int SHORT_DATA_SIZE = 64; +static constexpr std::size_t DATA_SIZE = 8 << 10; +static constexpr std::size_t SHORT_DATA_SIZE = 64; #if OPENSSL_VERSION_NUMBER <= 0x10100000L class SHA1Bench final : public td::Benchmark { @@ -285,8 +285,9 @@ class AesCtrOpenSSLBench final : public td::Benchmark { state.init(as_slice(key), as_slice(iv)); for (int i = 0; i < n; i++) { int len = 0; - EVP_EncryptUpdate(ctx, data_slice.ubegin(), &len, data_slice.ubegin(), DATA_SIZE); - CHECK(len == DATA_SIZE); + int int_size = static_cast<int>(DATA_SIZE); + EVP_EncryptUpdate(ctx, data_slice.ubegin(), &len, data_slice.ubegin(), int_size); + CHECK(len == int_size); } EVP_CIPHER_CTX_free(ctx); |
