diff --git a/interfaces/innerkits/dm/display_property.h b/interfaces/innerkits/dm/display_property.h index 7409c0d1..74a2fd73 100644 --- a/interfaces/innerkits/dm/display_property.h +++ b/interfaces/innerkits/dm/display_property.h @@ -31,7 +31,6 @@ public: int height_; float xDpi_; float yDpi_; - // Surface surface_; }; } // namespace OHOS::Rosen diff --git a/interfaces/innerkits/wm/wm_common.h b/interfaces/innerkits/wm/wm_common.h index a7b6a764..9b5c82d6 100644 --- a/interfaces/innerkits/wm/wm_common.h +++ b/interfaces/innerkits/wm/wm_common.h @@ -16,8 +16,6 @@ #ifndef OHOS_ROSEN_WM_COMMON_H #define OHOS_ROSEN_WM_COMMON_H -#include - namespace OHOS { namespace Rosen { enum class WindowType : uint32_t { diff --git a/interfaces/kits/napi/window_stage_module.cpp b/interfaces/kits/napi/window_stage_module.cpp index b6ad1d3a..3b79e4c2 100644 --- a/interfaces/kits/napi/window_stage_module.cpp +++ b/interfaces/kits/napi/window_stage_module.cpp @@ -20,8 +20,7 @@ extern const char _binary_window_stage_js_end[]; extern const char _binary_window_stage_abc_start[]; extern const char _binary_window_stage_abc_end[]; -extern "C" __attribute__((constructor)) -void NAPI_application_WindowStage_AutoRegister() +extern "C" __attribute__((constructor)) void NAPI_application_WindowStage_AutoRegister() { auto moduleManager = NativeModuleManager::GetInstance(); NativeModule newModuleInfo = { diff --git a/wm/include/window_impl.h b/wm/include/window_impl.h index 40377cd7..9620de4f 100644 --- a/wm/include/window_impl.h +++ b/wm/include/window_impl.h @@ -37,7 +37,7 @@ class WindowImpl : public Window { if (uiContent_ != nullptr) { \ uiContent_->uiContentCb(); \ } \ - } while (0); + } while (0) public: WindowImpl(const sptr& option); diff --git a/wm/include/window_input_channel.h b/wm/include/window_input_channel.h index 30a9b7ab..383819a7 100644 --- a/wm/include/window_input_channel.h +++ b/wm/include/window_input_channel.h @@ -12,14 +12,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +#ifndef OHOS_WINDOW_INPUT_CHANNEL +#define OHOS_WINDOW_INPUT_CHANNEL #include #include #include #include "refbase.h" #include "vsync_station.h" -#ifndef OHOS_WINDOW_INPUT_CHANNEL -#define OHOS_WINDOW_INPUT_CHANNEL namespace OHOS { namespace Rosen { diff --git a/wm/src/window_stub.cpp b/wm/src/window_stub.cpp index 106f7165..dc23c5c7 100644 --- a/wm/src/window_stub.cpp +++ b/wm/src/window_stub.cpp @@ -36,7 +36,7 @@ int WindowStub::OnRemoteRequest(uint32_t code, MessageParcel &data, MessageParce break; } case TRANS_ID_UPDATE_WINDOW_RECT: { - struct Rect rect{ data.ReadInt32(), data.ReadInt32(), data.ReadUint32(), data.ReadUint32() }; + struct Rect rect { data.ReadInt32(), data.ReadInt32(), data.ReadUint32(), data.ReadUint32() }; UpdateWindowRect(rect); break; } diff --git a/wmserver/include/window_manager_proxy.h b/wmserver/include/window_manager_proxy.h index c0f2d21d..8a7e7992 100644 --- a/wmserver/include/window_manager_proxy.h +++ b/wmserver/include/window_manager_proxy.h @@ -16,8 +16,8 @@ #ifndef OHOS_WINDOW_MANAGER_PROXY_H #define OHOS_WINDOW_MANAGER_PROXY_H -#include "window_manager_interface.h" #include +#include "window_manager_interface.h" namespace OHOS { namespace Rosen { diff --git a/wmserver/include/window_manager_stub.h b/wmserver/include/window_manager_stub.h index 4fa7df0a..1d124af8 100644 --- a/wmserver/include/window_manager_stub.h +++ b/wmserver/include/window_manager_stub.h @@ -16,8 +16,9 @@ #ifndef OHOS_WINDOW_MANAGER_STUB_H #define OHOS_WINDOW_MANAGER_STUB_H -#include "window_manager_interface.h" #include +#include "window_manager_interface.h" + namespace OHOS { namespace Rosen { class WindowManagerStub : public IRemoteStub { diff --git a/wmtest/frameworks/inative_test.h b/wmtest/frameworks/inative_test.h index 4a0ade05..640dd9ff 100644 --- a/wmtest/frameworks/inative_test.h +++ b/wmtest/frameworks/inative_test.h @@ -16,10 +16,8 @@ #ifndef OHOS_ROSEN_INATIVE_TEST_H #define OHOS_ROSEN_INATIVE_TEST_H -#include #include #include -#include namespace OHOS::Rosen { class INativeTest; diff --git a/wmtest/test/wm_native_test.cpp b/wmtest/test/wm_native_test.cpp index 6d63a5e2..ab0e1368 100644 --- a/wmtest/test/wm_native_test.cpp +++ b/wmtest/test/wm_native_test.cpp @@ -17,7 +17,7 @@ #include #include -#include +#include #include "window.h" #include "window_life_cycle_interface.h" #include "window_option.h" @@ -65,10 +65,10 @@ void WMNativeTest::Run(int32_t argc, const char **argv) return; } - while(true) { + while (true) { scene->GoForeground(); - sleep(3); + sleep(3); // Sleep for 3 seconds scene->GoBackground(); - sleep(3); + sleep(3); // Sleep for 3 seconds } }