about summary refs log tree commit diff
path: root/custom_mutators/libfuzzer/FuzzerDictionary.h
diff options
context:
space:
mode:
authorhexcoder- <heiko@hexco.de>2021-01-04 15:14:20 +0100
committerhexcoder- <heiko@hexco.de>2021-01-04 15:14:20 +0100
commit33a7d6f1688856c050b0ac71ac1df4018e4d531c (patch)
tree9e2888ee429ff46ed59feedd39020e9c3bad5b55 /custom_mutators/libfuzzer/FuzzerDictionary.h
parentc423aebb1a6987d8ca58175aee23bc08b611d4c8 (diff)
downloadafl++-33a7d6f1688856c050b0ac71ac1df4018e4d531c.tar.gz
code cleanups (from cppcheck)
Diffstat (limited to 'custom_mutators/libfuzzer/FuzzerDictionary.h')
-rw-r--r--custom_mutators/libfuzzer/FuzzerDictionary.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/custom_mutators/libfuzzer/FuzzerDictionary.h b/custom_mutators/libfuzzer/FuzzerDictionary.h
index 301c5d9a..ddd2d2f1 100644
--- a/custom_mutators/libfuzzer/FuzzerDictionary.h
+++ b/custom_mutators/libfuzzer/FuzzerDictionary.h
@@ -49,7 +49,7 @@ typedef FixedWord<64> Word;
 class DictionaryEntry {
  public:
   DictionaryEntry() {}
-  DictionaryEntry(Word W) : W(W) {}
+  explicit DictionaryEntry(Word W) : W(W) {}
   DictionaryEntry(Word W, size_t PositionHint) : W(W), PositionHint(PositionHint) {}
   const Word &GetW() const { return W; }
 
@@ -92,7 +92,7 @@ class Dictionary {
     assert(Idx < Size);
     return DE[Idx];
   }
-  void push_back(DictionaryEntry DE) {
+  void push_back(const DictionaryEntry &DE) {
     if (Size < kMaxDictSize)
       this->DE[Size++] = DE;
   }