szaszm commented on a change in pull request #1249:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1249#discussion_r800669223
##########
File path: libminifi/src/utils/StringUtils.cpp
##########
@@ -268,8 +321,8 @@ bool StringUtils::from_hex(uint8_t* data, size_t*
data_length, const char* hex,
return true;
}
-std::vector<uint8_t> StringUtils::from_hex(const char* hex, size_t hex_length)
{
- std::vector<uint8_t> decoded(hex_length / 2);
+std::vector<std::byte> StringUtils::from_hex(const char* hex, size_t
hex_length) {
+ std::vector<std::byte> decoded(hex_length / 2);
size_t data_length = decoded.size();
if (!from_hex(decoded.data(), &data_length, hex, hex_length)) {
throw std::invalid_argument("Hexencoded string is malformatted");
Review comment:
Chaging both to "malformed". I've never heard/read the word
"malformatted" before. After searching the internet for it, it looks like it
exists, but is very rarely used, so I'm not convinced that it's not just a
common mistake.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]