Enlightenment CVS committal
Author : pfritz
Project : e17
Module : apps/elitaire
Dir : e17/apps/elitaire/src
Modified Files:
rules.cpp
Log Message:
save some loops
===================================================================
RCS file: /cvs/e/e17/apps/elitaire/src/rules.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- rules.cpp 30 Dec 2007 15:17:16 -0000 1.3
+++ rules.cpp 13 Jun 2008 10:23:59 -0000 1.4
@@ -238,14 +238,16 @@
it = stacks[from]->begin();
it_end = stacks[from]->end();
- while (it != it_end) {
+ for (;it != it_end; it++) {
+ if (!moveableCard(*it))
+ continue;
+
for (size_t to = 0; to < stacks.size(); to++) {
- if (from != to && moveableCard(*it) && moveable(*it, to)) {
+ if (from != to && moveable(*it, to)) {
hints->push_back(*it);
break;
}
}
- it++;
}
}
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs