From: Hwankyu Jhun Date: Mon, 4 Jan 2021 00:16:46 +0000 (+0900) Subject: Fix coding style of component-based-port X-Git-Tag: submit/tizen/20210104.005215~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F96%2F250696%2F1;p=platform%2Fcore%2Fappfw%2Fcomponent-based-application.git Fix coding style of component-based-port - Removes extra space before '[' - Removes using directives Change-Id: I0dd6839019101322d7e92f52d3d182b562fcf2cf Signed-off-by: Hwankyu Jhun --- diff --git a/component_based/port/request.cc b/component_based/port/request.cc index b0defcc..5543273 100644 --- a/component_based/port/request.cc +++ b/component_based/port/request.cc @@ -46,7 +46,7 @@ void Request::ReadFromParcel(tizen_base::Parcel* parcel) { uint32_t size = 0; parcel->ReadUInt32(&size); if (size > 0) { - auto* data = new (std::nothrow) uint8_t [size]; + auto* data = new (std::nothrow) uint8_t[size]; if (data == nullptr) { _E("Out of memory"); return; diff --git a/component_based/port/response.cc b/component_based/port/response.cc index 46e8c2f..62142b5 100644 --- a/component_based/port/response.cc +++ b/component_based/port/response.cc @@ -44,7 +44,7 @@ void Response::ReadFromParcel(tizen_base::Parcel* parcel) { uint32_t size = 0; parcel->ReadUInt32(&size); if (size > 0) { - auto* data = new (std::nothrow) uint8_t [size]; + auto* data = new (std::nothrow) uint8_t[size]; if (data == nullptr) { _E("Out of memory"); return; diff --git a/component_based/port/stub.cc b/component_based/port/stub.cc index d28f43c..f064553 100644 --- a/component_based/port/stub.cc +++ b/component_based/port/stub.cc @@ -21,12 +21,11 @@ #include "component_based/port/port.hh" namespace { -using namespace component_based; -class PortStub : public Port, - public Port::IEvent { +class PortStub : public component_based::Port, + public component_based::Port::IEvent { public: - PortStub(std::string name) + explicit PortStub(std::string name) : Port(std::move(name), this) { } @@ -43,7 +42,7 @@ class PortStub : public Port, } private: - void OnRequest(const std::shared_ptr& sender, + void OnRequest(const std::shared_ptr& sender, const std::shared_ptr& request) override { if (request_cb_) { parcel_h parcel = static_cast(request.get()); @@ -51,7 +50,7 @@ class PortStub : public Port, } } - void OnSyncRequest(const std::shared_ptr& sender, + void OnSyncRequest(const std::shared_ptr& sender, const std::shared_ptr& request, std::shared_ptr& response) override { if (sync_request_cb_) { @@ -85,7 +84,7 @@ extern "C" EXPORT_API int component_port_create(const char* port_name, _E("Out of memory"); return COMPONENT_PORT_ERROR_OUT_OF_MEMORY; } - } catch (Exception& e) { + } catch (component_based::Exception& e) { _E("Failed to create port"); return COMPONENT_PORT_ERROR_IO_ERROR; }