diff options
author | Ryan Prichard <rprichard@google.com> | 2024-02-08 21:02:33 -0800 |
---|---|---|
committer | Ryan Prichard <rprichard@google.com> | 2024-02-08 21:02:33 -0800 |
commit | eea722a5ab2c12a0ffbd4561e17e94cf261261d4 (patch) | |
tree | 691346327957f2eb65e258b1c40d27e69ec0221b /nci/jni | |
parent | 811547616b48e3b10661b1c3ed3b8ffa7231a1b5 (diff) | |
download | Nfc-eea722a5ab2c12a0ffbd4561e17e94cf261261d4.tar.gz |
Use vector instead of std::basic_string<uint8_t>
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: m MODULES-IN-packages-apps-Nfc
Change-Id: I9669da4b8d3c9ec2553463d309b4c0c9ba335435
Diffstat (limited to 'nci/jni')
-rw-r--r-- | nci/jni/NativeNfcTag.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nci/jni/NativeNfcTag.cpp b/nci/jni/NativeNfcTag.cpp index b4aa7963..53e1fb41 100644 --- a/nci/jni/NativeNfcTag.cpp +++ b/nci/jni/NativeNfcTag.cpp @@ -85,7 +85,7 @@ static bool sCheckNdefCapable = false; // whether tag has NDEF capability static tNFA_HANDLE sNdefTypeHandlerHandle = NFA_HANDLE_INVALID; static tNFA_INTF_TYPE sCurrentRfInterface = NFA_INTERFACE_ISO_DEP; static tNFA_INTF_TYPE sCurrentActivatedProtocl = NFA_INTERFACE_ISO_DEP; -static std::basic_string<uint8_t> sRxDataBuffer; +static std::vector<uint8_t> sRxDataBuffer; static tNFA_STATUS sRxDataStatus = NFA_STATUS_OK; static bool sWaitingForTransceive = false; static bool sTransceiveRfTimeout = false; @@ -847,7 +847,7 @@ void nativeNfcTag_doTransceiveStatus(tNFA_STATUS status, uint8_t* buf, } sRxDataStatus = status; if (sRxDataStatus == NFA_STATUS_OK || sRxDataStatus == NFC_STATUS_CONTINUE) - sRxDataBuffer.append(buf, bufLen); + sRxDataBuffer.insert(sRxDataBuffer.end(), buf, buf + bufLen); if (sRxDataStatus == NFA_STATUS_OK) sTransceiveEvent.notifyOne(); } |