Mercurial > dive4elements > river
changeset 1907:6c7fdfd262ac
Do not re-evaluate constant size() in for-loops.
flys-artifacts/trunk@3267 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Wed, 16 Nov 2011 10:58:48 +0000 |
parents | 0de18085948a |
children | 19c53705a2eb |
files | flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WstValueTable.java |
diffstat | 2 files changed, 7 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog Wed Nov 16 10:25:16 2011 +0000 +++ b/flys-artifacts/ChangeLog Wed Nov 16 10:58:48 2011 +0000 @@ -1,3 +1,8 @@ +2011-11-16 Sascha L. Teichmann <sascha.teichmann@intevation.de> + + * src/main/java/de/intevation/flys/artifacts/model/WstValueTable.java: + Do not re-evaluate constant size() in for-loops. + 2011-11-16 Felix Wolfsteller <felix.wolfsteller@intevation.de> * src/main/java/de/intevation/flys/artifacts/WQKmsInterpolArtifact.java:
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WstValueTable.java Wed Nov 16 10:25:16 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WstValueTable.java Wed Nov 16 10:58:48 2011 +0000 @@ -55,7 +55,7 @@ this.name = name; } - public QRangeTree getQRangeTree() { + public QRangeTree getQRangeTree() { return qRangeTree; } @@ -687,7 +687,7 @@ break; } } - for (int after = rowIndex; after < rows.size(); after++) { + for (int after = rowIndex, R = rows.size(); after < R; after++) { if (!Double.isNaN(rows.get(after).ws[col])) { rowAfter = rows.get(after); break;