From c55e81b9466a0af9356797aca1ea1a870bc6de6d Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 1 May 2020 10:14:48 -0400 Subject: [PATCH] core/hw/rsa: Make operator bool explicit Prevents error-prone implicit conversions to bool from occurring. --- src/core/hw/rsa/rsa.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/hw/rsa/rsa.h b/src/core/hw/rsa/rsa.h index 6385ed783..51288f41f 100644 --- a/src/core/hw/rsa/rsa.h +++ b/src/core/hw/rsa/rsa.h @@ -16,7 +16,7 @@ public: : init(true), exponent(std::move(exponent)), modulus(std::move(modulus)) {} std::vector GetSignature(const std::vector& message); - operator bool() const { + explicit operator bool() const { // TODO(B3N30): Maybe check if exponent and modulus are vailid return init; }