Various cleanups and fixes due to feedback
This commit is contained in:
1 parent
ca3327dbed
commit
bfcbde1c97
5 files changed
+11
-14
No files matched your search
@@ -168,7 +168,7 @@ bool BigNumber::isZero() const
|
||||
return BN_is_zero(_bn);
|
||||
}
|
||||
|
||||
std::unique_ptr<uint8> BigNumber::AsByteArray(int32 minSize, bool littleEndian)
|
||||
std::unique_ptr<uint8[]> BigNumber::AsByteArray(int32 minSize, bool littleEndian)
|
||||
{
|
||||
int length = (minSize >= GetNumBytes()) ? minSize : GetNumBytes();
|
||||
|
||||
@@ -184,7 +184,7 @@ std::unique_ptr<uint8> BigNumber::AsByteArray(int32 minSize, bool littleEndian)
|
||||
if (littleEndian)
|
||||
std::reverse(array, array + length);
|
||||
|
||||
std::unique_ptr<uint8> ret(array);
|
||||
std::unique_ptr<uint8[]> ret(array);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ class BigNumber
|
||||
|
||||
uint32 AsDword();
|
||||
|
||||
std::unique_ptr<uint8> AsByteArray(int32 minSize = 0, bool littleEndian = true);
|
||||
std::unique_ptr<uint8[]> AsByteArray(int32 minSize = 0, bool littleEndian = true);
|
||||
|
||||
char * AsHexStr() const;
|
||||
char * AsDecStr() const;
|
||||
|
||||
Reference in new issue
Block a user