Replace std::basic_string<uint8_t> with std::vector
In newer versions of libc++, std::char_traits<T> is no longer defined for non-character types, and a result, std::basic_string<uint8_t> is also no longer defined. See https://discourse.llvm.org/t/deprecating-std-string-t-for-non-character-t/66779. Bug: 175635923 Test: make checkbuild Change-Id: Icb3937d8b1ff6dbe7e35e62f2e6cc1e2eb789121
This commit is contained in:
parent
7f9c47a388
commit
aecb0333b0
1 changed files with 2 additions and 2 deletions
|
@ -51,7 +51,7 @@ class HmacKeySharingTest : public KeymasterHidlTest {
|
|||
};
|
||||
|
||||
using KeymasterVec = std::vector<sp<IKeymasterDevice>>;
|
||||
using ByteString = std::basic_string<uint8_t>;
|
||||
using ByteString = std::vector<uint8_t>;
|
||||
// using NonceVec = std::vector<HidlBuf>;
|
||||
|
||||
GetParamsResult getHmacSharingParameters(IKeymasterDevice& keymaster) {
|
||||
|
@ -98,7 +98,7 @@ class HmacKeySharingTest : public KeymasterHidlTest {
|
|||
std::vector<ByteString> copyNonces(const hidl_vec<HmacSharingParameters>& paramsVec) {
|
||||
std::vector<ByteString> nonces;
|
||||
for (auto& param : paramsVec) {
|
||||
nonces.emplace_back(param.nonce.data(), param.nonce.size());
|
||||
nonces.emplace_back(param.nonce.data(), param.nonce.data() + param.nonce.size());
|
||||
}
|
||||
return nonces;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue