Skip to content

Commit

Permalink
Use static cast
Browse files Browse the repository at this point in the history
  • Loading branch information
ZehMatt committed Sep 20, 2024
1 parent f2cfc93 commit a18aa75
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions zasm/include/zasm/base/instruction.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ namespace zasm

assert(T::kInstrType == _type);

return *reinterpret_cast<T*>(this);
return static_cast<T&>(*this);
}

/// <summary>
Expand All @@ -129,7 +129,7 @@ namespace zasm

assert(T::kInstrType == _type);

return *reinterpret_cast<const T*>(this);
return static_cast<const T&>(*this);
}
};

Expand Down

0 comments on commit a18aa75

Please sign in to comment.