Fixes for older compilers

This commit is contained in:
Eddie Hung 2020-02-20 07:52:08 -08:00
parent a179d918ec
commit 78929e8c3d
2 changed files with 9 additions and 2 deletions

View File

@ -38,7 +38,14 @@ struct TimingInfo
bool operator!=(const NameBit& nb) const { return !operator==(nb); }
unsigned int hash() const { return mkhash_add(name.hash(), offset); }
};
typedef std::pair<NameBit,NameBit> BitBit;
struct BitBit
{
NameBit first, second;
BitBit(const NameBit &first, const NameBit &second) : first(first), second(second) {}
BitBit(const SigBit &first, const SigBit &second) : first(first), second(second) {}
bool operator==(const BitBit& bb) const { return bb.first == first && bb.second == second; }
unsigned int hash() const { return mkhash_add(first.hash(), second.hash()); }
};
struct ModuleTiming
{

View File

@ -680,7 +680,7 @@ void prep_box(RTLIL::Design *design, bool dff_mode)
first = false;
else
ss << " ";
auto jt = t.find(std::make_pair(TimingInfo::NameBit(i),TimingInfo::NameBit(o)));
auto jt = t.find(TimingInfo::BitBit(i,o));
if (jt == t.end())
ss << "-";
else