|
@@ -359,7 +359,17 @@ std::string bytesToHex(const std::vector<char>& bytes)
|
|
|
|
|
|
std::ostream& operator<<(std::ostream& os, const Scalar& output)
|
|
|
{
|
|
|
+ if (os.flags() & std::ios::hex)
|
|
|
+ {
|
|
|
+ os << output.toInt();
|
|
|
+ return os;
|
|
|
+ }
|
|
|
+
|
|
|
std::string outString = output.element.get_str(16);
|
|
|
+
|
|
|
+ if (outString.size() % 2 == 1)
|
|
|
+ outString = "0" + outString;
|
|
|
+
|
|
|
std::vector<char> bytes = hexToBytes(outString);
|
|
|
|
|
|
BinarySizeT sizeOfVector(bytes.size());
|