From 03abf89b54dbe2a579ffc26800f8d38a863a2672 Mon Sep 17 00:00:00 2001 From: "mk5004.lee" Date: Mon, 6 Apr 2020 19:39:50 +0900 Subject: [PATCH] Check coding style for newly added files Change-Id: I26ce777ee172f2bb85aa16e2adb6e45c96fd7d21 Signed-off-by: mk5004.lee --- ambient-viewer/src/ambient-viewer.cc | 2 +- ambient-viewer/src/stub.cc | 61 +++++++++++++----------------------- ambient-viewer/src/watch-surface.cc | 2 +- watch-holder/src/ambient_listener.cc | 4 +-- watch-holder/src/watch.cc | 2 +- watch-holder/src/watch_holder.cc | 6 ++-- watch-holder/src/watch_mirror.cc | 2 +- 7 files changed, 30 insertions(+), 49 deletions(-) diff --git a/ambient-viewer/src/ambient-viewer.cc b/ambient-viewer/src/ambient-viewer.cc index 86f058b..2b54362 100644 --- a/ambient-viewer/src/ambient-viewer.cc +++ b/ambient-viewer/src/ambient-viewer.cc @@ -189,7 +189,7 @@ int AmbientViewer::OnReceiveSignal(const char* endpoint, aul_app_com_result_e e, Bundle b = Bundle(envelope, false, false); - std::string event_type= b.GetString("__APP_AMBIENT_EVENT__"); + std::string event_type = b.GetString("__APP_AMBIENT_EVENT__"); int type = stoi(event_type); std::string sender = b.GetString("__APP_AMBIENT_SENDER__"); diff --git a/ambient-viewer/src/stub.cc b/ambient-viewer/src/stub.cc index e419321..a0f9665 100644 --- a/ambient-viewer/src/stub.cc +++ b/ambient-viewer/src/stub.cc @@ -108,7 +108,7 @@ class AmbientViewerStub : public AmbientViewer { return AMBIENT_VIEWER_ERROR_NONE; } - int SetReceiveCallbackInfo (unique_ptr info) { + int SetReceiveCallbackInfo(unique_ptr info) { event_cb_ = move(info); return AMBIENT_VIEWER_ERROR_NONE; } @@ -124,8 +124,7 @@ class AmbientViewerStub : public AmbientViewer { }; extern "C" EXPORT_API int ambient_viewer_create(Evas_Object *win, - ambient_viewer_h *handle) -{ + ambient_viewer_h *handle) { if (win == nullptr || handle == nullptr) { LOGE("Invalid parameter"); return AMBIENT_VIEWER_ERROR_INVALID_PARAMETER; @@ -142,8 +141,7 @@ extern "C" EXPORT_API int ambient_viewer_create(Evas_Object *win, return AMBIENT_VIEWER_ERROR_NONE; } -extern "C" EXPORT_API int ambient_viewer_destroy(ambient_viewer_h handle) -{ +extern "C" EXPORT_API int ambient_viewer_destroy(ambient_viewer_h handle) { if (handle == nullptr) { LOGE("Invalid parameter"); return AMBIENT_VIEWER_ERROR_INVALID_PARAMETER; @@ -156,23 +154,22 @@ extern "C" EXPORT_API int ambient_viewer_destroy(ambient_viewer_h handle) } extern "C" EXPORT_API int ambient_viewer_notify_ambient_event( - ambient_viewer_h handle, bool enter, - ambient_viewer_direction_e dir, bundle *extra) -{ + ambient_viewer_h handle, bool enter, + ambient_viewer_direction_e dir, bundle *extra) { if (handle == nullptr) { LOGE("Invalid parameter"); return AMBIENT_VIEWER_ERROR_INVALID_PARAMETER; } AmbientViewerStub* stub = static_cast(handle); - stub->NotifyAmbientEvent(enter, static_cast(dir), Bundle(extra, false, false)); + stub->NotifyAmbientEvent(enter, static_cast(dir), + Bundle(extra, false, false)); return AMBIENT_VIEWER_ERROR_NONE; } extern "C" EXPORT_API int ambient_viewer_block_update(ambient_viewer_h handle, - bool enable) -{ + bool enable) { if (handle == nullptr) { LOGE("Invalid parameter"); return AMBIENT_VIEWER_ERROR_INVALID_PARAMETER; @@ -185,8 +182,7 @@ extern "C" EXPORT_API int ambient_viewer_block_update(ambient_viewer_h handle, } extern "C" EXPORT_API int ambient_viewer_monitor(ambient_viewer_h handle, - ambient_viewer_lifecycle_s lifecycle, void *user_data) -{ + ambient_viewer_lifecycle_s lifecycle, void *user_data) { if (handle == nullptr) { LOGE("Invalid parameter"); return AMBIENT_VIEWER_ERROR_INVALID_PARAMETER; @@ -194,7 +190,7 @@ extern "C" EXPORT_API int ambient_viewer_monitor(ambient_viewer_h handle, AmbientViewerStub* stub = static_cast(handle); - unique_ptr info ( + unique_ptr info( new (nothrow)MonitorCallbackInfo(lifecycle, user_data)); if (info.get() == nullptr) { LOGE("out of memory"); @@ -207,8 +203,7 @@ extern "C" EXPORT_API int ambient_viewer_monitor(ambient_viewer_h handle, return AMBIENT_VIEWER_ERROR_NONE; } -extern "C" EXPORT_API int ambient_viewer_unmonitor(ambient_viewer_h handle) -{ +extern "C" EXPORT_API int ambient_viewer_unmonitor(ambient_viewer_h handle) { if (handle == nullptr) { LOGE("Invalid parameter"); return AMBIENT_VIEWER_ERROR_INVALID_PARAMETER; @@ -222,9 +217,7 @@ extern "C" EXPORT_API int ambient_viewer_unmonitor(ambient_viewer_h handle) } extern "C" EXPORT_API int ambient_viewer_set_event_listener( - ambient_viewer_h handle, - ambient_viewer_event_cb callback, void *user_data) -{ + ambient_viewer_h handle, ambient_viewer_event_cb callback, void *user_data) { if (handle == nullptr) { LOGE("Invalid parameter"); return AMBIENT_VIEWER_ERROR_INVALID_PARAMETER; @@ -232,7 +225,7 @@ extern "C" EXPORT_API int ambient_viewer_set_event_listener( AmbientViewerStub* stub = static_cast(handle); - unique_ptr info ( + unique_ptr info( new (nothrow)ReceiveCallbackInfo(callback, user_data)); if (info.get() == nullptr) { LOGE("out of memory"); @@ -245,8 +238,7 @@ extern "C" EXPORT_API int ambient_viewer_set_event_listener( } extern "C" EXPORT_API int ambient_viewer_unset_event_listener( - ambient_viewer_h handle) -{ + ambient_viewer_h handle) { if (handle == nullptr) { LOGE("Invalid parameter"); return AMBIENT_VIEWER_ERROR_INVALID_PARAMETER; @@ -259,9 +251,7 @@ extern "C" EXPORT_API int ambient_viewer_unset_event_listener( } extern "C" EXPORT_API int ambient_viewer_get_watch_surface( - ambient_viewer_h handle, - ambient_viewer_surface_h *surface) -{ + ambient_viewer_h handle, ambient_viewer_surface_h *surface) { if (handle == nullptr) { LOGE("Invalid parameter"); return AMBIENT_VIEWER_ERROR_INVALID_PARAMETER; @@ -274,9 +264,7 @@ extern "C" EXPORT_API int ambient_viewer_get_watch_surface( } extern "C" EXPORT_API int ambient_viewer_get_top_app_surface( - ambient_viewer_h handle, - ambient_viewer_surface_h *surface) -{ + ambient_viewer_h handle, ambient_viewer_surface_h *surface) { if (handle == nullptr) { LOGE("Invalid parameter"); return AMBIENT_VIEWER_ERROR_INVALID_PARAMETER; @@ -289,8 +277,7 @@ extern "C" EXPORT_API int ambient_viewer_get_top_app_surface( } extern "C" EXPORT_API int ambient_viewer_surface_get_cur_image( - ambient_viewer_surface_h handle, Evas_Object **image) -{ + ambient_viewer_surface_h handle, Evas_Object **image) { if (handle == nullptr) { LOGE("Invalid parameter"); return AMBIENT_VIEWER_ERROR_INVALID_PARAMETER; @@ -303,8 +290,7 @@ extern "C" EXPORT_API int ambient_viewer_surface_get_cur_image( } extern "C" EXPORT_API int ambient_viewer_surface_is_watch( - ambient_viewer_surface_h handle, bool *is_watch) -{ + ambient_viewer_surface_h handle, bool *is_watch) { if (handle == nullptr) { LOGE("Invalid parameter"); return AMBIENT_VIEWER_ERROR_INVALID_PARAMETER; @@ -317,8 +303,7 @@ extern "C" EXPORT_API int ambient_viewer_surface_is_watch( } extern "C" EXPORT_API int ambient_viewer_surface_get_app_id( - ambient_viewer_surface_h handle, char **app_id) -{ + ambient_viewer_surface_h handle, char **app_id) { if (handle == nullptr) { LOGE("Invalid parameter"); return AMBIENT_VIEWER_ERROR_INVALID_PARAMETER; @@ -334,8 +319,7 @@ extern "C" EXPORT_API int ambient_viewer_surface_get_app_id( } extern "C" EXPORT_API int ambient_viewer_surface_get_inst_id( - ambient_viewer_surface_h handle, char **inst_id) -{ + ambient_viewer_surface_h handle, char **inst_id) { if (handle == nullptr) { LOGE("Invalid parameter"); return AMBIENT_VIEWER_ERROR_INVALID_PARAMETER; @@ -351,8 +335,7 @@ extern "C" EXPORT_API int ambient_viewer_surface_get_inst_id( } extern "C" EXPORT_API int ambient_viewer_surface_get_opr( - ambient_viewer_surface_h handle, float *opr) -{ + ambient_viewer_surface_h handle, float *opr) { if (handle == nullptr) { LOGE("Invalid parameter"); return AMBIENT_VIEWER_ERROR_INVALID_PARAMETER; @@ -362,4 +345,4 @@ extern "C" EXPORT_API int ambient_viewer_surface_get_opr( *opr = surface->GetOpr(); return AMBIENT_VIEWER_ERROR_NONE; -} \ No newline at end of file +} diff --git a/ambient-viewer/src/watch-surface.cc b/ambient-viewer/src/watch-surface.cc index 43c0ddd..6d920cf 100644 --- a/ambient-viewer/src/watch-surface.cc +++ b/ambient-viewer/src/watch-surface.cc @@ -124,4 +124,4 @@ void WatchSurface::OnEvasChanged(const std::string& appId, listener_->OnUpdated(*this); } -} // namespace ambient_viewer +} // namespace ambient_viewer diff --git a/watch-holder/src/ambient_listener.cc b/watch-holder/src/ambient_listener.cc index 07dedb3..094cd84 100644 --- a/watch-holder/src/ambient_listener.cc +++ b/watch-holder/src/ambient_listener.cc @@ -56,7 +56,7 @@ namespace watch_holder { } tizen_base::Bundle b = tizen_base::Bundle(envelope, true, true); - std::string event_type= b.GetString("__APP_AMBIENT_EVENT__"); + std::string event_type = b.GetString("__APP_AMBIENT_EVENT__"); LOGI("event type (%s)", event_type.c_str()); int type = stoi(event_type); std::string sender = b.GetString("__APP_AMBIENT_SENDER__"); @@ -99,4 +99,4 @@ namespace watch_holder { if (ambient_event_signal_conn_) aul_app_com_leave(ambient_event_signal_conn_); } -} +} // namespace watch_holder diff --git a/watch-holder/src/watch.cc b/watch-holder/src/watch.cc index 61c98c8..d99a87b 100644 --- a/watch-holder/src/watch.cc +++ b/watch-holder/src/watch.cc @@ -172,4 +172,4 @@ int Watch::NotifyChangedEvent() const { return 0; } -} // namspace watch_holder +} // namespace watch_holder diff --git a/watch-holder/src/watch_holder.cc b/watch-holder/src/watch_holder.cc index 63e6512..0ef373b 100644 --- a/watch-holder/src/watch_holder.cc +++ b/watch-holder/src/watch_holder.cc @@ -38,7 +38,7 @@ WatchHolder::~WatchHolder() { aul_app_com_leave(dead_signal_conn_); if (launch_signal_conn_) aul_app_com_leave(launch_signal_conn_); -}; +} WatchHolder::WatchHolder(Evas_Object* win) : win_(win) { if (aul_app_com_create("watch.dead", nullptr, @@ -85,11 +85,9 @@ int WatchHolder::Launch( } void WatchHolder::EnableRendering() { - } void WatchHolder::DisableRendering(int timeout) { - } const std::list>& WatchHolder::GetStack() const { @@ -156,4 +154,4 @@ int WatchHolder::OnLaunchSignal(const char *endpoint, return 0; } -} +} // namespace watch_holder diff --git a/watch-holder/src/watch_mirror.cc b/watch-holder/src/watch_mirror.cc index 0c4df0b..d31b087 100644 --- a/watch-holder/src/watch_mirror.cc +++ b/watch-holder/src/watch_mirror.cc @@ -121,4 +121,4 @@ void WatchMirror::OnRemoved(const Watch& watch) { void WatchMirror::OnBound(const Watch& watch) { } -} \ No newline at end of file +} // namespace watch_holder -- 2.7.4