mirror of
https://github.com/YosysHQ/yosys
synced 2025-09-12 20:51:27 +00:00
Deprecate Const::bits()
This commit is contained in:
parent
f9ee5e4c31
commit
e41bf86cc3
2 changed files with 7 additions and 4 deletions
|
@ -738,6 +738,8 @@ private:
|
|||
|
||||
bitvectype& get_bits() const;
|
||||
std::string& get_str() const;
|
||||
std::vector<RTLIL::State>& bits_internal();
|
||||
|
||||
public:
|
||||
Const() : flags(RTLIL::CONST_FLAG_NONE), tag(backing_tag::bits), bits_(std::vector<RTLIL::State>()) {}
|
||||
Const(const std::string &str);
|
||||
|
@ -765,7 +767,8 @@ public:
|
|||
bool operator ==(const RTLIL::Const &other) const;
|
||||
bool operator !=(const RTLIL::Const &other) const;
|
||||
|
||||
std::vector<RTLIL::State>& bits();
|
||||
[[deprecated]]
|
||||
std::vector<RTLIL::State>& bits() { return bits_internal(); }
|
||||
bool as_bool() const;
|
||||
|
||||
// Convert the constant value to a C++ int.
|
||||
|
@ -798,10 +801,10 @@ public:
|
|||
|
||||
void append(const RTLIL::Const &other);
|
||||
void set(int i, RTLIL::State state) {
|
||||
bits()[i] = state;
|
||||
bits_internal()[i] = state;
|
||||
}
|
||||
void resize(int size, RTLIL::State fill) {
|
||||
bits().resize(size, fill);
|
||||
bits_internal().resize(size, fill);
|
||||
}
|
||||
|
||||
class const_iterator {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue