operand: Use pure virtual functions

This commit is contained in:
ReinUsesLisp
2019-11-01 06:07:53 -03:00
parent 4c2981eab5
commit b4eeadfd9b
8 changed files with 39 additions and 51 deletions

View File

@@ -25,12 +25,12 @@ void Op::Fetch(Stream& stream) const {
stream.Write(id.value());
}
u16 Op::GetWordCount() const {
u16 Op::GetWordCount() const noexcept {
return 1;
}
bool Op::operator==(const Operand& other) const {
if (GetType() != other.GetType()) {
bool Op::operator==(const Operand& other) const noexcept {
if (!EqualType(other)) {
return false;
}
const auto& op = static_cast<const Op&>(other);