int nameLen = strlen(view->getName());
const char *name = view->getName();
- for (VIEW_ITR it = this->_viewList.begin(); it != this->_viewList.end(); it++) {
- UiIfaceView *view = *it;
- const char *viewName = view->getName();
+ for (UiIfaceView *v : this->_viewList) {
+ const char *viewName = v->getName();
if (!viewName) continue;
int viewNameLen = strlen(viewName);
//Got you!
if ((viewNameLen == nameLen) && !strcmp(name, viewName)) {
- LOGE("the same name of UiIfaceView(%p) is already in this UiIfaceViewmgr(%p)", view, this);
+ LOGE("the same name of UiIfaceView(%p) is already in this UiIfaceViewmgr(%p)", v, this);
return false;
}
}
{
int idx = 0;
- for (VIEW_ITR it = this->_viewList.begin(); it != this->_viewList.end(); it++) {
- if (view == *it) return idx;
+ for (UiIfaceView *v : this->_viewList) {
+ if (view == v) return idx;
++idx;
}
if (!name) return NULL;
int nameLen = strlen(name);
- for (VIEW_ITR it = this->_viewList.begin(); it != this->_viewList.end(); it++) {
- UiIfaceView *view = *it;
- const char *viewName = view->getName();
+ for (UiIfaceView *v : this->_viewList) {
+ const char *viewName = v->getName();
if (!viewName) continue;
int viewNameLen = strlen(viewName);
//Got you!
if ((viewNameLen == nameLen) && !strcmp(name, viewName)) {
- return view;
+ return v;
}
}