Skip to content

Commit 0b19848

Browse files
committed
fixing missing clear function
fixing missing include
1 parent 22c475c commit 0b19848

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

bitset/include/cpp-utilities/bitset.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#define UTILITY_BITSET_HPP_
2727

2828
#include <bitset>
29+
#include <cstdint>
2930

3031
namespace bitset {
3132

hash/include/cpp-utilities/sha1.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,11 @@ class sha1 {
149149
swap(state_, other.state_);
150150
}
151151

152-
void clear();
152+
void clear() {
153+
digest_ = digest();
154+
state_ = state();
155+
}
156+
153157
digest finalize() const {
154158
// make copies so this isn't a mutating operation
155159
state s = state_;

0 commit comments

Comments
 (0)