Skip to content

Commit

Permalink
refactor(address): remove implicit conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
Curve committed May 13, 2024
1 parent af2b75b commit 4b0fc51
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 deletions.
4 changes: 0 additions & 4 deletions include/lime/address.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,6 @@ namespace lime
[[nodiscard]] std::optional<address> operator-(std::size_t) const;
[[nodiscard]] std::optional<address> operator+(std::size_t) const;

public:
[[nodiscard]] operator void *() const;
[[nodiscard]] operator std::uintptr_t() const;

public:
[[nodiscard]] std::strong_ordering operator<=>(const address &) const;

Expand Down
12 changes: 1 addition & 11 deletions src/address.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,19 +80,9 @@ namespace lime
return at(m_impl->address - amount);
}

address::operator void *() const
{
return ptr();
}

address::operator std::uintptr_t() const
{
return addr();
}

std::strong_ordering address::operator<=>(const address &other) const
{
const auto address = static_cast<std::uintptr_t>(other);
const auto address = other.addr();

if (address > m_impl->address)
{
Expand Down

0 comments on commit 4b0fc51

Please sign in to comment.