aboutsummaryrefslogtreecommitdiffhomepage
path: root/benchmark/check_tls.cpp
diff options
context:
space:
mode:
authorlevlam <levlam@telegram.org>2021-11-01 01:24:51 +0300
committerlevlam <levlam@telegram.org>2021-11-01 01:24:51 +0300
commitc66cf3dec6c23016ef44fed9a888053f2f5fc9ce (patch)
treef0692da5d737a00e9dac374a2beab7cb7eb2efb7 /benchmark/check_tls.cpp
parent7cd7e5afd38cb32439ecad62bb81c5bb8eb26a8a (diff)
Use range-based for on arrays/strings if possible.
Diffstat (limited to 'benchmark/check_tls.cpp')
-rw-r--r--benchmark/check_tls.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/benchmark/check_tls.cpp b/benchmark/check_tls.cpp
index afc80b800..b2fa2ecd0 100644
--- a/benchmark/check_tls.cpp
+++ b/benchmark/check_tls.cpp
@@ -96,8 +96,8 @@ td::Result<TlsInfo> test_tls(const td::string &url) {
const size_t MAX_GREASE = 7;
char greases[MAX_GREASE];
td::Random::secure_bytes(td::MutableSlice{greases, MAX_GREASE});
- for (size_t i = 0; i < MAX_GREASE; i++) {
- greases[i] = static_cast<char>((greases[i] & 0xF0) + 0x0A);
+ for (auto &grease : greases) {
+ grease = static_cast<char>((grease & 0xF0) + 0x0A);
}
for (size_t i = 1; i < MAX_GREASE; i += 2) {
if (greases[i] == greases[i - 1]) {