mirror of
https://github.com/openharmony/communication_connected_nfc_tag.git
synced 2026-06-30 21:57:55 -04:00
@@ -52,7 +52,7 @@ void NapiEvent::EventNotify(AsyncEventData *asyncEvent)
|
||||
napi_open_handle_scope(asyncEvent->env_, &scope);
|
||||
if (scope == nullptr) {
|
||||
HILOGE("scope is nullptr");
|
||||
napi_close_handle_scope(asyncEvent->env_, scope);
|
||||
delete asyncEvent;
|
||||
return;
|
||||
}
|
||||
napi_value undefine;
|
||||
|
||||
@@ -71,7 +71,7 @@ NfcTagClient::~NfcTagClient()
|
||||
const char* NfcTagClient::GetErrCodeString(ErrCode code)
|
||||
{
|
||||
if ((code >= 0) && (code <= NFC_ERR_MAX)) {
|
||||
for (int i = 0; i < sizeof(g_errCodeMap)/sizeof(ErrCodeMap); ++i) {
|
||||
for (int i = 0; i < static_cast<int>(sizeof(g_errCodeMap)/sizeof(ErrCodeMap)); ++i) {
|
||||
if (g_errCodeMap[i].code == code) {
|
||||
return g_errCodeMap[i].str;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user