get rid of piForeach
apply some code analyzer recommendations ICU flag now check if libicu exists prepare for more accurate growth of containers (limited PoT, then constantly increase size)
This commit is contained in:
@@ -505,7 +505,7 @@ void PIScreen::wheel_event(PIKbdListener::WheelEvent we) {
|
||||
|
||||
bool PIScreen::nextFocus(PIScreenTile * rt, PIKbdListener::KeyEvent key) {
|
||||
PIVector<PIScreenTile *> vtl = rt->children(true), ftl;
|
||||
piForeach(PIScreenTile * t, vtl) {
|
||||
for (PIScreenTile * t: vtl) {
|
||||
if (t->focus_flags[CanHasFocus]) ftl << t;
|
||||
}
|
||||
int ind = -1;
|
||||
@@ -535,7 +535,7 @@ bool PIScreen::nextFocus(PIScreenTile * rt, PIKbdListener::KeyEvent key) {
|
||||
// piCout << ftl.size() << ind << next;
|
||||
if (next != 0) {
|
||||
PIVector<PIScreenTile *> tl = rt->children();
|
||||
piForeach(PIScreenTile * t, tl)
|
||||
for (PIScreenTile * t: tl)
|
||||
t->has_focus = false;
|
||||
if (!ftl.isEmpty()) {
|
||||
ind += next;
|
||||
@@ -565,7 +565,7 @@ void PIScreen::tileSetFocusInternal(PIScreenTile * t) {
|
||||
PIScreenTile * rt = rootTile();
|
||||
if (tile_dialog) rt = tile_dialog;
|
||||
PIVector<PIScreenTile *> tl = rt->children(), ftl;
|
||||
piForeach(PIScreenTile * i, tl)
|
||||
for (PIScreenTile * i: tl)
|
||||
i->has_focus = false;
|
||||
tile_focus = t;
|
||||
if (!tile_focus) return;
|
||||
@@ -651,7 +651,7 @@ void PIScreen::end() {
|
||||
|
||||
PIScreenTile * PIScreen::tileByName(const PIString & name) {
|
||||
PIVector<PIScreenTile *> tl(tiles());
|
||||
piForeach(PIScreenTile * t, tl)
|
||||
for (PIScreenTile * t: tl)
|
||||
if (t->name() == name) return t;
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user