@@ -10048,17 +10048,38 @@ namespace BinaryNinja {
1004810048 */
1004910049 struct Variable : public BNVariable
1005010050 {
10051- Variable();
10052- Variable(BNVariableSourceType type, uint32_t index, uint64_t storage);
10053- Variable(BNVariableSourceType type, uint64_t storage);
10054- Variable(const BNVariable& var);
10055- Variable(const Variable& var);
10051+ Variable() : BNVariable{RegisterVariableSourceType, 0, 0} {}
10052+ Variable(BNVariableSourceType type, uint64_t storage) : Variable(type, 0, storage) {}
10053+ Variable(BNVariableSourceType type, uint32_t index, uint64_t storage)
10054+ : BNVariable{type, index, static_cast<int64_t>(storage)}
10055+ {
10056+ }
10057+ Variable(const BNVariable& var) : BNVariable(var) {}
10058+
10059+ Variable(const Variable&) = default;
10060+ Variable& operator=(const Variable&) = default;
1005610061
10057- Variable& operator=(const Variable& var);
10062+ Variable(Variable&&) = default;
10063+ Variable& operator=(Variable&&) = default;
10064+
10065+ bool operator==(const Variable& var) const
10066+ {
10067+ return type == var.type && index == var.index && storage == var.storage;
10068+ }
1005810069
10059- bool operator==(const Variable& var) const;
10060- bool operator!=(const Variable& var) const;
10061- bool operator<(const Variable& var) const;
10070+ bool operator!=(const Variable& var) const
10071+ {
10072+ return !(*this == var);
10073+ }
10074+
10075+ bool operator<(const Variable& var) const
10076+ {
10077+ if (type != var.type)
10078+ return type < var.type;
10079+ if (storage != var.storage)
10080+ return storage < var.storage;
10081+ return index < var.index;
10082+ }
1006210083
1006310084 uint64_t ToIdentifier() const;
1006410085 static Variable FromIdentifier(uint64_t id);
0 commit comments