diff --git a/interfaces/kits/jskits/src/native_parameters_js.cpp b/interfaces/kits/jskits/src/native_parameters_js.cpp index 5ac99215f3f19a6869d1636034732c898aa1fe88..2182a69b2aec45df141623a8cddabdd656204ba5 100755 --- a/interfaces/kits/jskits/src/native_parameters_js.cpp +++ b/interfaces/kits/jskits/src/native_parameters_js.cpp @@ -21,7 +21,7 @@ static constexpr int ARGC_NUMBER = 2; static constexpr int ARGC_THREE_NUMBER = 3; static constexpr int BUF_LENGTH = 256; -using StorageAsyncContext = struct { +using StorageAsyncContext = struct StorageAsyncContext { napi_env env = nullptr; napi_async_work work = nullptr; diff --git a/interfaces/kits/jskits/src/native_parameters_watch.cpp b/interfaces/kits/jskits/src/native_parameters_watch.cpp index 741260668d38ffb101b53140ed7ded6329cf5317..9da0c7bd99f7e93da0bf83f66330adf9708870d0 100755 --- a/interfaces/kits/jskits/src/native_parameters_watch.cpp +++ b/interfaces/kits/jskits/src/native_parameters_watch.cpp @@ -24,7 +24,7 @@ static constexpr int BUF_LENGTH = 128; static napi_ref g_paramWatchRef; -using ParamAsyncContext = struct { +using ParamAsyncContext = struct ParamAsyncContext { napi_env env = nullptr; napi_async_work work = nullptr; @@ -40,7 +40,7 @@ using ParamAsyncContext = struct { std::string getValue; }; -using ParamWatcher = struct { +using ParamWatcher = struct ParamWatcher { napi_env env = nullptr; napi_ref thisVarRef = nullptr; char keyPrefix[BUF_LENGTH] = { 0 }; @@ -52,7 +52,7 @@ using ParamWatcher = struct { std::map callbackReferences {}; }; -using ParamWatcherWork = struct { +using ParamWatcherWork = struct ParamWatcherWork { napi_async_work work = nullptr; ParamWatcher *watcher = nullptr; bool startWatch = false;