mirror of
https://git.suyu.dev/suyu/sirit.git
synced 2026-01-05 05:59:18 +01:00
literal_number: Drop usage of RTTI
This commit is contained in:
parent
de91660f3c
commit
cff0a41416
2 changed files with 7 additions and 10 deletions
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
namespace Sirit {
|
||||
|
||||
LiteralNumber::LiteralNumber(std::type_index type) : type(type) {
|
||||
LiteralNumber::LiteralNumber(u64 raw, bool is_32) : raw{raw}, is_32{is_32} {
|
||||
operand_type = OperandType::Number;
|
||||
}
|
||||
|
||||
|
|
@ -30,7 +30,7 @@ u16 LiteralNumber::GetWordCount() const {
|
|||
bool LiteralNumber::operator==(const Operand& other) const {
|
||||
if (operand_type == other.GetType()) {
|
||||
const auto& o{static_cast<const LiteralNumber&>(other)};
|
||||
return o.type == type && o.raw == raw;
|
||||
return o.raw == raw && o.is_32 == is_32;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue