Changeset 10001 in josm for trunk/src/org/openstreetmap/josm/tools/Diff.java
- Timestamp:
- 2016-03-17T01:50:12+01:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/Diff.java
r9231 r10001 177 177 for (int c = 1;; ++c) { 178 178 int d; /* Active diagonal. */ 179 boolean big _snake = false;179 boolean bigSnake = false; 180 180 181 181 /* Extend the top-down search by an edit step in each diagonal. */ … … 204 204 } 205 205 if (x - oldx > SNAKE_LIMIT) { 206 big _snake = true;206 bigSnake = true; 207 207 } 208 208 fd[fdiagoff + d] = x; … … 238 238 } 239 239 if (oldx - x > SNAKE_LIMIT) { 240 big _snake = true;240 bigSnake = true; 241 241 } 242 242 bd[bdiagoff + d] = x; … … 255 255 of changes, the algorithm is linear in the file size. */ 256 256 257 if (c > 200 && big _snake && heuristic) {257 if (c > 200 && bigSnake && heuristic) { 258 258 int best = 0; 259 259 int bestpos = -1; … … 618 618 */ 619 619 int[] equivCount() { 620 int[] equiv _count = new int[equivMax];620 int[] equivCount = new int[equivMax]; 621 621 for (int i = 0; i < bufferedLines; ++i) { 622 ++equiv _count[equivs[i]];623 } 624 return equiv _count;622 ++equivCount[equivs[i]]; 623 } 624 return equivCount; 625 625 } 626 626 … … 853 853 void shift_boundaries(FileData f) { 854 854 final boolean[] changed = changedFlag; 855 final boolean[] other _changed = f.changedFlag;855 final boolean[] otherChanged = f.changedFlag; 856 856 int i = 0; 857 857 int j = 0; 858 int i _end = bufferedLines;858 int iEnd = bufferedLines; 859 859 int preceding = -1; 860 int other _preceding = -1;860 int otherPreceding = -1; 861 861 862 862 for (;;) { 863 int start, end, other _start;863 int start, end, otherStart; 864 864 865 865 /* Scan forwards to find beginning of another run of changes. 866 866 Also keep track of the corresponding point in the other file. */ 867 867 868 while (i < i _end && !changed[1+i]) {869 while (other _changed[1+j++]) {868 while (i < iEnd && !changed[1+i]) { 869 while (otherChanged[1+j++]) { 870 870 /* Non-corresponding lines in the other file 871 871 will count as the preceding batch of changes. */ 872 other _preceding = j;872 otherPreceding = j; 873 873 } 874 874 i++; 875 875 } 876 876 877 if (i == i _end) {877 if (i == iEnd) { 878 878 break; 879 879 } 880 880 881 881 start = i; 882 other _start = j;882 otherStart = j; 883 883 884 884 for (;;) { 885 885 /* Now find the end of this run of changes. */ 886 886 887 while (i < i _end && changed[1+i]) {887 while (i < iEnd && changed[1+i]) { 888 888 i++; 889 889 } … … 899 899 Only because the previous run was shifted here. */ 900 900 901 if (end != i _end && equivs[start] == equivs[end] && !other_changed[1+j]902 && !((preceding >= 0 && start == preceding) || (other _preceding >= 0 && other_start == other_preceding))) {901 if (end != iEnd && equivs[start] == equivs[end] && !otherChanged[1+j] 902 && !((preceding >= 0 && start == preceding) || (otherPreceding >= 0 && otherStart == otherPreceding))) { 903 903 changed[1+end++] = true; 904 904 changed[1+start++] = false; … … 914 914 915 915 preceding = i; 916 other _preceding = j;916 otherPreceding = j; 917 917 } 918 918 }
Note:
See TracChangeset
for help on using the changeset viewer.