mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-14 07:37:57 -05:00
common/hex_util: Combine HexVectorToString() and HexArrayToString()
These can be generified together by using a concept type to designate them. This also has the benefit of not making copies of potentially very large arrays.
This commit is contained in:
@ -30,13 +30,6 @@ std::vector<u8> HexStringToVector(std::string_view str, bool little_endian) {
|
||||
return out;
|
||||
}
|
||||
|
||||
std::string HexVectorToString(const std::vector<u8>& vector, bool upper) {
|
||||
std::string out;
|
||||
for (u8 c : vector)
|
||||
out += fmt::format(upper ? "{:02X}" : "{:02x}", c);
|
||||
return out;
|
||||
}
|
||||
|
||||
std::array<u8, 16> operator""_array16(const char* str, std::size_t len) {
|
||||
if (len != 32) {
|
||||
LOG_ERROR(Common,
|
||||
|
Reference in New Issue
Block a user