diff options
author | Daniel Neus <[email protected]> | 2016-02-08 20:44:31 +0100 |
---|---|---|
committer | Daniel Neus <[email protected]> | 2016-02-08 21:07:18 +0100 |
commit | 9102d33dbd35e36d385ad813220446384a214030 (patch) | |
tree | cd636cd089d29b914da08f1ef8cbf83756c0e1ff /src/tests/test_compression.cpp | |
parent | 84ca4e52944f61a50cf02d8e18816597b241099d (diff) |
V814 Decreased performance. The 'strlen' function was called multiple times inside the body of a loop. test_compression.cpp 78
Diffstat (limited to 'src/tests/test_compression.cpp')
-rw-r--r-- | src/tests/test_compression.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/tests/test_compression.cpp b/src/tests/test_compression.cpp index affc6040d..fd247803a 100644 --- a/src/tests/test_compression.cpp +++ b/src/tests/test_compression.cpp @@ -58,6 +58,7 @@ class Compression_Tests : public Test std::vector<Test::Result> run() override { std::vector<Test::Result> results; + const size_t text_len = strlen(text_str); for(std::string algo : { "zlib", "deflate", "gzip", "bz2", "lzma" }) { @@ -75,8 +76,6 @@ class Compression_Tests : public Test continue; } - const size_t text_len = strlen(text_str); - const Botan::secure_vector<uint8_t> empty; const Botan::secure_vector<uint8_t> all_zeros(text_len, 0); const Botan::secure_vector<uint8_t> random_binary = Test::rng().random_vec(text_len); |