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
Notes: sideshowbarker 2024-07-19 07:05:30 +09:00

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();