Code Review
/
apps
/
agl-service-windowmanager-2017.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
bc27132
)
Fix the mistake of generating new layerID
author
Kazumasa Mitsunari
<knimitz@witz-inc.co.jp>
Sat, 8 Sep 2018 07:43:22 +0000
(16:43 +0900)
committer
Kazumasa Mitsunari
<knimitz@witz-inc.co.jp>
Sat, 8 Sep 2018 07:43:22 +0000
(16:43 +0900)
Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
src/wm_layer.cpp
patch
|
blob
|
history
diff --git
a/src/wm_layer.cpp
b/src/wm_layer.cpp
index
01e8950
..
cd381c2
100644
(file)
--- a/
src/wm_layer.cpp
+++ b/
src/wm_layer.cpp
@@
-127,8
+127,8
@@
unsigned WMLayer::getNewLayerID(const string& role)
return ret;
}
-
auto id_found = std::find
(id_list.begin(), id_list.end(), ret);
- if( (ret > this->idEnd()) || (
id_found != id_list.cend())
)
+
size_t count = std::count
(id_list.begin(), id_list.end(), ret);
+ if( (ret > this->idEnd()) || (
count > 1)
)
{
HMI_NOTICE("id %d is not available then generate new id", ret);
ret = 0; // reset