SRC-xiaojin commented on code in PR #419:
URL:
https://github.com/apache/rocketmq-client-cpp/pull/419#discussion_r906806681
##########
src/producer/StringIdMaker.cpp:
##########
@@ -125,11 +125,11 @@ std::string StringIdMaker::createUniqID() {
return std::string(kFixString, 20) + std::string(hex_buf, 12);
}
-void StringIdMaker::hexdump(unsigned char* in, char* out, std::size_t len) {
- for (std::size_t i = 0; i < len; i++) {
- unsigned char v = in[i];
- out[i * 2] = sHexAlphabet[v >> 4];
- out[i * 2 + 1] = sHexAlphabet[v & 0x0FU];
+void StringIdMaker::hexdump(unsigned char* buffer, char* out_buff, std::size_t
index) {
+ for (std::size_t i = 0; i < index; i++) {
+ unsigned char v = buffer[i];
+ out_buff[i * 2] = sHexAlphabet[v >> 4];
+ out_buff[i * 2 + 1] = sHexAlphabet[v & 0x0FU];
Review Comment:
function declaration below:
static void hexdump(unsigned char* buffer, char* out_buff, std::size_t
index);
when I use "Visual Studio 17 2022" ,hava compile error, so I think need
change
--
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]