}
-typedef list<UiPopup*>::reverse_iterator popupRitr;
-
void UiViewImpl::_connectPopup(UiPopup *popup)
{
this->_popupList.push_back(popup);
bool UiViewImpl::_deactivatePopup(bool topOne)
{
- for (popupRitr it = this->_popupList.rbegin(); it != this->_popupList.rend(); it++) {
+ for (auto it = this->_popupList.rbegin(); it != this->_popupList.rend(); it++) {
UiPopup *popup = *it;
if (!popup->isActivated()) continue;
popup->onBack();
//FIXME: Read system profile to decide whether support event block or not.
bool UiIfaceViewmgrImpl::_eventBlock = true;
-#define VIEW_ITR list<UiIfaceView *>::iterator
-#define VIEW_RITR list<UiIfaceView *>::reverse_iterator
-
bool UiIfaceViewmgrImpl::insertViewAfter(UiIfaceView *view, UiIfaceView *after)
{
- VIEW_ITR it;
-
if (!view) {
LOGE("invalid view argument. view(NULL)");
return false;
}
if (this->_viewList.size() > 0) {
- for (it = this->_viewList.begin(); it != this->_viewList.end(); it++) {
+ for (auto it = this->_viewList.begin(); it != this->_viewList.end(); it++) {
if (after == *it) {
//If the after is a last item of list.
//view has to push now.
{
//Terminate views
this->_destroying = EINA_TRUE;
- for (VIEW_RITR ritr = this->_viewList.rbegin(); ritr != this->_viewList.rend(); ritr++) {
+ for (auto ritr = this->_viewList.rbegin(); ritr != this->_viewList.rend(); ritr++) {
UiIfaceView *view = *ritr;
if ((view->getState() != UI_VIEW_STATE_DEACTIVATE) &&
(view->getState() != UI_VIEW_STATE_UNLOAD)) {
bool UiIfaceViewmgrImpl::insertViewBefore(UiIfaceView *view, UiIfaceView *before)
{
- VIEW_ITR it;
-
if (!view) {
LOGE("invalid view argument. view(NULL)");
return false;
}
if (this->_viewList.size() > 0) {
- for (it = this->_viewList.begin(); it != this->_viewList.end(); it++) {
+ for (auto it = this->_viewList.begin(); it != this->_viewList.end(); it++) {
if (before == *it) {
this->_viewList.insert(it, view);
-
return true;
}
}
return NULL;
}
- VIEW_ITR it = this->_viewList.begin();
+ auto it = this->_viewList.begin();
advance(it, idx);
return *it;
}