mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
Variable should be declared before loop
Fixing incorrect variable scope. (I do not really see any functional differences on Firefox, but better declare the variable before the loop.) Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
de49957a52
commit
194d4b4c00
1 changed files with 3 additions and 1 deletions
|
@ -431,10 +431,12 @@ function sort_it(sortOn, function_)
|
|||
for (var j = 0; j < itemsToShow.length; j++) {
|
||||
visited[j] = false;
|
||||
}
|
||||
|
||||
var iSmaller;
|
||||
for (var i = 0; i < itemsToShow.length; i++) {
|
||||
for (var j = 0; j < itemsToShow.length; j++)
|
||||
if (visited[j] === false)
|
||||
var iSmaller = j;
|
||||
iSmaller = j;
|
||||
for (var j = 0; j < itemsToShow.length; j++) {
|
||||
if (function_(itemsToShow[j], itemsToShow[iSmaller])) {
|
||||
if (visited[j] === false) {
|
||||
|
|
Loading…
Reference in a new issue