Code Review
/
apps
/
agl-service-windowmanager.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Fix build error : Warning C++1z
[apps/agl-service-windowmanager.git]
/
src
/
wm_client.cpp
diff --git
a/src/wm_client.cpp
b/src/wm_client.cpp
index
24e2247
..
72517bd
100644
(file)
--- a/
src/wm_client.cpp
+++ b/
src/wm_client.cpp
@@
-84,7
+84,7
@@
unsigned WMClient::surfaceID(const string &role) const
{
if (0 == this->role2surface.count(role))
{
{
if (0 == this->role2surface.count(role))
{
- HMI_
WARNING("wm", "invalid role"
);
+ HMI_
NOTICE("wm", "invalid role %s : appID : %s", role.c_str(), this->id.c_str()
);
return INVALID_SURFACE_ID;
}
return this->role2surface.at(role);
return INVALID_SURFACE_ID;
}
return this->role2surface.at(role);
@@
-92,10
+92,11
@@
unsigned WMClient::surfaceID(const string &role) const
std::string WMClient::role(unsigned surface) const
{
std::string WMClient::role(unsigned surface) const
{
- for(const auto&
[key, value]
: this->role2surface)
+ for(const auto&
x
: this->role2surface)
{
{
- if(value == surface){
- return key;
+ if(x.second == surface)
+ {
+ return x.first;
}
}
return std::string("");
}
}
return std::string("");
@@
-129,6
+130,8
@@
bool WMClient::removeSurfaceIfExist(unsigned surface)
{
if (surface == x.second)
{
{
if (surface == x.second)
{
+ HMI_INFO("wm", "Remove surface from client %s: role %s, surface: %d",
+ this->id.c_str(), x.first.c_str(), x.second);
this->role2surface.erase(x.first);
ret = true;
break;
this->role2surface.erase(x.first);
ret = true;
break;
@@
-148,6
+151,7
@@
bool WMClient::removeRole(const string &role)
return ret;
}
return ret;
}
+#ifndef GTEST_ENABLED
bool WMClient::subscribe(afb_req req, const string &evname)
{
if(evname != kKeyError){
bool WMClient::subscribe(afb_req req, const string &evname)
{
if(evname != kKeyError){
@@
-180,6
+184,7
@@
void WMClient::emitError(WM_CLIENT_ERROR_EVENT ev)
HMI_DEBUG("wm", "afb_event_push failed: %m");
}
}
HMI_DEBUG("wm", "afb_event_push failed: %m");
}
}
+#endif
void WMClient::dumpInfo()
{
void WMClient::dumpInfo()
{