diff options
author | practicalswift <practicalswift@users.noreply.github.com> | 2020-05-10 18:35:55 +0000 |
---|---|---|
committer | practicalswift <practicalswift@users.noreply.github.com> | 2020-05-14 18:52:57 +0000 |
commit | cd34038cbda4864e4770734c44b18d3e01aa2a28 (patch) | |
tree | d08835aeb6ee0f4b11a4c827eb2150957d63dd37 /src/test/fuzz/asmap_direct.cpp | |
parent | fb559c1170773360afb9d05daaccd57d18636ee9 (diff) |
Switch from Optional<T> to std::optional<T> (C++17). Run clang-format.
Diffstat (limited to 'src/test/fuzz/asmap_direct.cpp')
-rw-r--r-- | src/test/fuzz/asmap_direct.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/test/fuzz/asmap_direct.cpp b/src/test/fuzz/asmap_direct.cpp index 6d8a65f5ab..2d21eff9d6 100644 --- a/src/test/fuzz/asmap_direct.cpp +++ b/src/test/fuzz/asmap_direct.cpp @@ -2,8 +2,8 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#include <util/asmap.h> #include <test/fuzz/fuzz.h> +#include <util/asmap.h> #include <cstdint> #include <optional> @@ -34,7 +34,9 @@ void test_one_input(const std::vector<uint8_t>& buffer) if (SanityCheckASMap(asmap, buffer.size() - 1 - sep_pos)) { // Verify that for valid asmaps, no prefix (except up to 7 zero padding bits) is valid. std::vector<bool> asmap_prefix = asmap; - while (!asmap_prefix.empty() && asmap_prefix.size() + 7 > asmap.size() && asmap_prefix.back() == false) asmap_prefix.pop_back(); + while (!asmap_prefix.empty() && asmap_prefix.size() + 7 > asmap.size() && asmap_prefix.back() == false) { + asmap_prefix.pop_back(); + } while (!asmap_prefix.empty()) { asmap_prefix.pop_back(); assert(!SanityCheckASMap(asmap_prefix, buffer.size() - 1 - sep_pos)); |