File tree Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -103,8 +103,11 @@ class Coin
103
103
*/
104
104
struct CCoinsCacheEntry
105
105
{
106
+ private:
107
+ uint8_t m_flags{0 };
108
+
109
+ public:
106
110
Coin coin; // The actual cached data.
107
- unsigned char flags{0 };
108
111
109
112
enum Flags {
110
113
/* *
@@ -130,14 +133,14 @@ struct CCoinsCacheEntry
130
133
CCoinsCacheEntry () noexcept = default ;
131
134
explicit CCoinsCacheEntry (Coin&& coin_) noexcept : coin(std::move(coin_)) {}
132
135
133
- inline void AddFlags (unsigned char flags) noexcept { this -> flags |= flags; }
136
+ inline void AddFlags (uint8_t flags) noexcept { m_flags |= flags; }
134
137
inline void ClearFlags () noexcept
135
138
{
136
- flags = 0 ;
139
+ m_flags = 0 ;
137
140
}
138
- inline unsigned char GetFlags () const noexcept { return flags ; }
139
- inline bool IsDirty () const noexcept { return flags & DIRTY; }
140
- inline bool IsFresh () const noexcept { return flags & FRESH; }
141
+ inline uint8_t GetFlags () const noexcept { return m_flags ; }
142
+ inline bool IsDirty () const noexcept { return m_flags & DIRTY; }
143
+ inline bool IsFresh () const noexcept { return m_flags & FRESH; }
141
144
};
142
145
143
146
/* *
Original file line number Diff line number Diff line change @@ -125,7 +125,7 @@ FUZZ_TARGET(coins_view, .init = initialize_coins_view)
125
125
LIMITED_WHILE (good_data && fuzzed_data_provider.ConsumeBool (), 10'000 )
126
126
{
127
127
CCoinsCacheEntry coins_cache_entry;
128
- coins_cache_entry.AddFlags (fuzzed_data_provider.ConsumeIntegral <unsigned char >());
128
+ coins_cache_entry.AddFlags (fuzzed_data_provider.ConsumeIntegral <uint8_t >());
129
129
if (fuzzed_data_provider.ConsumeBool ()) {
130
130
coins_cache_entry.coin = random_coin;
131
131
} else {
You can’t perform that action at this time.
0 commit comments