URL:
https://svn.lrde.epita.fr/svn/oln/trunk/milena/sandbox
ChangeLog:
2009-09-17 Fabien Freling <fabien.freling(a)lrde.epita.fr>
Fix index value bug.
* fabien/mln/core/image/cache.hh: Fix index value bug.
* fabien/tests/core/image/tiled2d.cc: Minor update.
---
mln/core/image/cache.hh | 2 +-
tests/core/image/tiled2d.cc | 6 +-----
2 files changed, 2 insertions(+), 6 deletions(-)
Index: trunk/milena/sandbox/fabien/tests/core/image/tiled2d.cc
===================================================================
--- trunk/milena/sandbox/fabien/tests/core/image/tiled2d.cc (revision 4491)
+++ trunk/milena/sandbox/fabien/tests/core/image/tiled2d.cc (revision 4492)
@@ -43,7 +43,7 @@
mln_piter_(tiled2d<rgb8>) p(tiled_ima.domain());
for_all(p)
- if (p.row() % 256 == 0)
+ if (p.row() % 16 == 0)
{
//std::cout << tiled_ima(p);
tiled_ima(p) = literal::green;
@@ -51,9 +51,5 @@
//mln_assertion(tiled_ima(p) == ima(p));
}
- /*for_all(p)
- if (p.col() % 16 == 0)
- tiled_ima(p) = literal::purple;*/
-
return 0;
}
Index: trunk/milena/sandbox/fabien/mln/core/image/cache.hh
===================================================================
--- trunk/milena/sandbox/fabien/mln/core/image/cache.hh (revision 4491)
+++ trunk/milena/sandbox/fabien/mln/core/image/cache.hh (revision 4492)
@@ -171,7 +171,7 @@
else // We must find which page to discard.
{
unsigned min = this->order_[0];
- unsigned new_index = 0;
+ new_index = 0;
for (unsigned i = 1; i < this->pages_.nelements(); ++i)
{
if (this->order_[i] < min)