refactor: XwindowsClipboard , use std::ranges::for_each in sendReply
This commit is contained in:
parent
2cccc3d0c8
commit
c4c4c09eb2
1 changed files with 1 additions and 1 deletions
|
|
@ -1020,7 +1020,7 @@ bool XWindowsClipboard::sendReply(Reply *reply)
|
||||||
const std::string hex_digits = "0123456789abcdef";
|
const std::string hex_digits = "0123456789abcdef";
|
||||||
std::string tmp;
|
std::string tmp;
|
||||||
tmp.reserve(data.length() * 3);
|
tmp.reserve(data.length() * 3);
|
||||||
std::for_each(data.begin(), data.end(), [hex_digits, &tmp](const unsigned char &c) {
|
std::ranges::for_each(data, [&hex_digits, &tmp](const unsigned char &c) {
|
||||||
tmp += hex_digits[c >> 16];
|
tmp += hex_digits[c >> 16];
|
||||||
tmp += hex_digits[c & 15];
|
tmp += hex_digits[c & 15];
|
||||||
tmp += ' ';
|
tmp += ' ';
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue