1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:37:35 +00:00

LibCrypto: Cleanup UnsignedBigInteger a bit

- Add missing 'explicit' to the constructor
- Remove unneeded 'AK::' in AK::Vector
- Avoid copying 'words' in constructor
This commit is contained in:
Itamar 2020-04-09 18:59:53 +03:00 committed by Andreas Kling
parent 2125a4debb
commit c52d3e65b9

View file

@ -38,12 +38,12 @@ class UnsignedBigInteger {
public:
UnsignedBigInteger(u32 x) { m_words.append(x); }
UnsignedBigInteger(AK::Vector<u32>&& words)
: m_words(words)
explicit UnsignedBigInteger(AK::Vector<u32, STARTING_WORD_SIZE>&& words)
: m_words(move(words))
{
}
UnsignedBigInteger() {}
UnsignedBigInteger() { }
static UnsignedBigInteger from_base10(const String& str);
static UnsignedBigInteger create_invalid();