aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/test_stream.cpp
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2022-02-04 18:21:11 -0500
committerJack Lloyd <[email protected]>2022-02-06 08:52:17 -0500
commitbfa36e60338538a3563f542e0ac76d21b6ad7019 (patch)
treeeab4f996e829a6f9cbf0b65936a457d7c7dd538c /src/tests/test_stream.cpp
parentfbb7c5fba1bcde2460dda48c1423a23b3b3062bf (diff)
Fix clang-tidy readability-container-size-empty warnings
Diffstat (limited to 'src/tests/test_stream.cpp')
-rw-r--r--src/tests/test_stream.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/tests/test_stream.cpp b/src/tests/test_stream.cpp
index 1992fec3d..bea97f9ce 100644
--- a/src/tests/test_stream.cpp
+++ b/src/tests/test_stream.cpp
@@ -61,7 +61,7 @@ class Stream_Cipher_Tests final : public Text_Based_Test
if(cipher->default_iv_length() == 0)
{
- result.confirm("if default iv length is zero, no iv supported", nonce.size() == 0);
+ result.confirm("if default iv length is zero, no iv supported", nonce.empty());
// This should still succeed
cipher->set_iv(nullptr, 0);
@@ -98,7 +98,7 @@ class Stream_Cipher_Tests final : public Text_Based_Test
}
bool accepted_nonce_early = false;
- if(nonce.size() > 0)
+ if(!nonce.empty())
{
try
{
@@ -136,7 +136,7 @@ class Stream_Cipher_Tests final : public Text_Based_Test
not set. So, don't set the nonce now, to ensure the previous call
had an effect.
*/
- if(nonce.size() > 0 && accepted_nonce_early == false)
+ if(!nonce.empty() && accepted_nonce_early == false)
{
cipher->set_iv(nonce.data(), nonce.size());
}
@@ -158,7 +158,7 @@ class Stream_Cipher_Tests final : public Text_Based_Test
result.test_eq(provider, "encrypt", buf, expected);
}
- if(nonce.size() > 0)
+ if(!nonce.empty())
{
std::vector<uint8_t> buf = input;
cipher->set_iv(nonce.data(), nonce.size());