Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions include/electronic-id/enums.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ class CertificateType
bool isSigning() const { return value == SIGNING; }

constexpr bool operator==(const CertificateType other) const { return value == other.value; }
constexpr bool operator!=(const CertificateType other) const { return value != other.value; }
operator std::string() const;

private:
Expand Down Expand Up @@ -73,7 +72,6 @@ class HashAlgorithm
HashAlgorithm(const std::string&);

constexpr bool operator==(HashAlgorithmEnum other) const { return value == other; }
constexpr bool operator!=(HashAlgorithmEnum other) const { return value != other; }
constexpr operator HashAlgorithmEnum() const { return value; }

operator std::string() const;
Expand Down Expand Up @@ -146,14 +144,9 @@ class SignatureAlgorithm

constexpr bool operator==(HashAlgorithm other) const
{
return operator HashAlgorithm() == other;
}
constexpr bool operator!=(HashAlgorithm other) const
{
return operator HashAlgorithm() != other;
return other.operator ==(operator HashAlgorithm());
}
constexpr bool operator==(SignatureAlgorithmEnum other) const { return value == other; }
constexpr bool operator!=(SignatureAlgorithmEnum other) const { return value != other; }

constexpr operator HashAlgorithm() const
{
Expand Down Expand Up @@ -190,7 +183,6 @@ class JsonWebSignatureAlgorithm
}

constexpr bool operator==(JsonWebSignatureAlgorithmEnum other) const { return value == other; }
constexpr bool operator!=(JsonWebSignatureAlgorithmEnum other) const { return value != other; }
constexpr operator JsonWebSignatureAlgorithmEnum() const { return value; }

operator std::string() const;
Expand Down