Skip to content

Commit

Permalink
rtlil: Fix value type for iterator over SigSpec
Browse files Browse the repository at this point in the history
When we are iterating over a `SigSpec`, the visited values will be of
type `SigBit` (as is the return type of `operator*()`). Account for that
in the publicly declared types.
  • Loading branch information
povik committed Dec 9, 2023
1 parent 7c21cea commit e10cf32
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions kernel/rtlil.h
Original file line number Diff line number Diff line change
Expand Up @@ -806,10 +806,10 @@ struct RTLIL::SigBit
struct RTLIL::SigSpecIterator
{
typedef std::input_iterator_tag iterator_category;
typedef RTLIL::SigSpec value_type;
typedef RTLIL::SigBit value_type;
typedef ptrdiff_t difference_type;
typedef RTLIL::SigSpec* pointer;
typedef RTLIL::SigSpec& reference;
typedef RTLIL::SigBit* pointer;
typedef RTLIL::SigBit& reference;

RTLIL::SigSpec *sig_p;
int index;
Expand All @@ -823,10 +823,10 @@ struct RTLIL::SigSpecIterator
struct RTLIL::SigSpecConstIterator
{
typedef std::input_iterator_tag iterator_category;
typedef RTLIL::SigSpec value_type;
typedef RTLIL::SigBit value_type;
typedef ptrdiff_t difference_type;
typedef RTLIL::SigSpec* pointer;
typedef RTLIL::SigSpec& reference;
typedef RTLIL::SigBit* pointer;
typedef RTLIL::SigBit& reference;

const RTLIL::SigSpec *sig_p;
int index;
Expand Down

0 comments on commit e10cf32

Please sign in to comment.