diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-04-16 16:01:22 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-04-16 16:01:22 +0000 |
commit | 71d5a2540a98c81f5bcaeb48805e0e2881f530ef (patch) | |
tree | 5343938942df402b49ec7300a1c25a2d4ccd5821 /lib/Fuzzer/FuzzerDictionary.h | |
parent | 31bbf64f3a4974a2d6c8b3b27ad2f519caf74057 (diff) |
Diffstat (limited to 'lib/Fuzzer/FuzzerDictionary.h')
-rw-r--r-- | lib/Fuzzer/FuzzerDictionary.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/Fuzzer/FuzzerDictionary.h b/lib/Fuzzer/FuzzerDictionary.h index eba0eabb6838..84cee87b8971 100644 --- a/lib/Fuzzer/FuzzerDictionary.h +++ b/lib/Fuzzer/FuzzerDictionary.h @@ -20,8 +20,9 @@ namespace fuzzer { // A simple POD sized array of bytes. -template <size_t kMaxSize> class FixedWord { +template <size_t kMaxSizeT> class FixedWord { public: + static const size_t kMaxSize = kMaxSizeT; FixedWord() {} FixedWord(const uint8_t *B, uint8_t S) { Set(B, S); } @@ -32,10 +33,12 @@ public: } bool operator==(const FixedWord<kMaxSize> &w) const { + ScopedDoingMyOwnMemOrStr scoped_doing_my_own_mem_os_str; return Size == w.Size && 0 == memcmp(Data, w.Data, Size); } bool operator<(const FixedWord<kMaxSize> &w) const { + ScopedDoingMyOwnMemOrStr scoped_doing_my_own_mem_os_str; if (Size != w.Size) return Size < w.Size; return memcmp(Data, w.Data, Size) < 0; @@ -50,7 +53,7 @@ private: uint8_t Data[kMaxSize]; }; -typedef FixedWord<27> Word; // 28 bytes. +typedef FixedWord<64> Word; class DictionaryEntry { public: |