From c18d1bfc63d6aad07d58074bc8fd6f15a14c8716 Mon Sep 17 00:00:00 2001 From: Kazumasa Mitsunari Date: Fri, 8 Jun 2018 18:28:42 +0900 Subject: Rename the arguments Not use "ID" Change-Id: Ic36f5c649ba7f36cc254b5d159940f345cb4d571 Signed-off-by: Kazumasa Mitsunari --- src/wm-client.cpp | 14 +++++++------- src/wm-client.hpp | 6 +++--- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/wm-client.cpp b/src/wm-client.cpp index 2542016..753b1d0 100644 --- a/src/wm-client.cpp +++ b/src/wm-client.cpp @@ -37,11 +37,11 @@ static const char kKeyrole[] = "role"; static const char kKeyError[] = "error"; static const char kKeyErrorDesc[] = "kErrorDescription"; -WMClient::WMClient(const string &appid, unsigned layerID, unsigned surfaceID, const string &role) - : id(appid), layer(layerID), +WMClient::WMClient(const string &appid, unsigned layer, unsigned surface, const string &role) + : id(appid), layer(layer), role2surface(0) { - role2surface[role] = surfaceID; + role2surface[role] = surface; for (auto x : kWMEvents) { #if GTEST_ENABLED @@ -95,9 +95,9 @@ unsigned WMClient::layerID() const return this->layer; } -void WMClient::registerLayer(unsigned layerID) +void WMClient::registerLayer(unsigned layer) { - this->layer = layerID; + this->layer = layer; } bool WMClient::addSurface(const string &role, unsigned surface) @@ -111,12 +111,12 @@ bool WMClient::addSurface(const string &role, unsigned surface) return true; } -bool WMClient::removeSurfaceIfExist(unsigned surfaceID) +bool WMClient::removeSurfaceIfExist(unsigned surface) { bool ret = false; for (auto &x : this->role2surface) { - if (surfaceID == x.second) + if (surface == x.second) { this->role2surface.erase(x.first); ret = true; diff --git a/src/wm-client.hpp b/src/wm-client.hpp index ad9e7b0..5fa9444 100644 --- a/src/wm-client.hpp +++ b/src/wm-client.hpp @@ -39,16 +39,16 @@ class WMClient { public: WMClient(); - WMClient(const std::string &appid, unsigned layerID, unsigned surfaceID, const std::string &role); + WMClient(const std::string &appid, unsigned layer, unsigned surface, const std::string &role); WMClient(const std::string &appid, const std::string &role); virtual ~WMClient(); std::string appID() const; unsigned surfaceID(const std::string &role) const; unsigned layerID() const; - void registerLayer(unsigned layerID); + void registerLayer(unsigned layer); bool addSurface(const std::string& role, unsigned surface); - bool removeSurfaceIfExist(unsigned surfaceID); + bool removeSurfaceIfExist(unsigned surface); bool removeRole(const std::string& role); bool subscribe(afb_req req, const std::string &event_name); -- cgit 1.2.3-korg