This commit is contained in:
Nav
2021-12-28 01:16:29 +00:00
parent fe635128f4
commit c29db60b4c
2 changed files with 7 additions and 8 deletions

View File

@@ -68,7 +68,7 @@ namespace Bloom
return this->flippedMap.at(key); return this->flippedMap.at(key);
} }
std::unordered_map<TypeA, TypeB> getMap() { std::unordered_map<TypeA, TypeB> getMap() const {
return this->map; return this->map;
} }

View File

@@ -47,14 +47,13 @@ namespace Bloom::Targets
bool operator < (const TargetRegisterDescriptor& other) const { bool operator < (const TargetRegisterDescriptor& other) const {
if (this->type == other.type) { if (this->type == other.type) {
return this->startAddress.value_or(0) < other.startAddress.value_or(0); return this->startAddress.value_or(0) < other.startAddress.value_or(0);
} else {
/*
* If the registers are of different type, there is no meaningful way to sort them, so we just use
* the unique hash.
*/
return this->getHash() < other.getHash();
} }
/*
* If the registers are of different type, there is no meaningful way to sort them, so we just use
* the unique hash.
*/
return this->getHash() < other.getHash();
} }
private: private: