Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit aecb0333 authored by Ryan Prichard's avatar Ryan Prichard
Browse files

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
parent 7f9c47a3
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;
    }