diff --git a/src/core/hw/rsa/rsa.cpp b/src/core/hw/rsa/rsa.cpp index 8f2c93243b..a349cbf371 100644 --- a/src/core/hw/rsa/rsa.cpp +++ b/src/core/hw/rsa/rsa.cpp @@ -74,7 +74,7 @@ void InitSlots() { std::vector exponent(256); file.ReadArray(exponent.data(), exponent.size()); - rsa_slots[0] = RsaSlot(exponent, modulus); + rsa_slots[0] = RsaSlot(std::move(exponent), std::move(modulus)); // TODO(B3N30): Initalize the other slots. But since they aren't used at all, we can skip them // for now } diff --git a/src/core/hw/rsa/rsa.h b/src/core/hw/rsa/rsa.h index 869d98d892..6385ed783e 100644 --- a/src/core/hw/rsa/rsa.h +++ b/src/core/hw/rsa/rsa.h @@ -11,9 +11,9 @@ namespace HW::RSA { class RsaSlot { public: - RsaSlot() : init(false) {} - RsaSlot(const std::vector& exponent, const std::vector& modulus) - : init(true), exponent(exponent), modulus(modulus) {} + RsaSlot() = default; + RsaSlot(std::vector exponent, std::vector modulus) + : init(true), exponent(std::move(exponent)), modulus(std::move(modulus)) {} std::vector GetSignature(const std::vector& message); operator bool() const { @@ -22,7 +22,7 @@ public: } private: - bool init; + bool init = false; std::vector exponent; std::vector modulus; };