Ignore:
Timestamp:
2015-05-11T13:34:53+02:00 (10 years ago)
Author:
Don-vip
Message:

squid:S00116 - Field names should comply with a naming convention

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/Diff.java

    r8342 r8346  
    1616 *
    1717 * Revision 1.13  2009/12/07 17:43:17  stuart
    18  * Compute equiv_max for int[] ctor
     18 * Compute equivMax for int[] ctor
    1919 *
    2020 * Revision 1.12  2009/12/07 17:34:46  stuart
     
    102102    /** 1 more than the maximum equivalence value used for this or its
    103103     sibling file. */
    104     private int equiv_max = 1;
     104    private int equivMax = 1;
    105105
    106106    /** When set to true, the comparison uses a heuristic to speed it up.
     
    111111    /** When set to true, the algorithm returns a guarranteed minimal
    112112      set of changes.  This makes things slower, sometimes much slower. */
    113     public boolean no_discards = false;
     113    public boolean noDiscards = false;
    114114
    115115    private int[] xvec, yvec; /* Vectors being compared. */
     
    352352        if (xoff == xlim) {
    353353            while (yoff < ylim) {
    354                 filevec[1].changed_flag[1+filevec[1].realindexes[yoff++]] = true;
     354                filevec[1].changedFlag[1+filevec[1].realindexes[yoff++]] = true;
    355355            }
    356356        } else if (yoff == ylim) {
    357357            while (xoff < xlim) {
    358                 filevec[0].changed_flag[1+filevec[0].realindexes[xoff++]] = true;
     358                filevec[0].changedFlag[1+filevec[0].realindexes[xoff++]] = true;
    359359            }
    360360        } else {
     
    524524
    525525        int diags =
    526             filevec[0].nondiscarded_lines + filevec[1].nondiscarded_lines + 3;
     526            filevec[0].nondiscardedLines + filevec[1].nondiscardedLines + 3;
    527527        fdiag = new int[diags];
    528         fdiagoff = filevec[1].nondiscarded_lines + 1;
     528        fdiagoff = filevec[1].nondiscardedLines + 1;
    529529        bdiag = new int[diags];
    530         bdiagoff = filevec[1].nondiscarded_lines + 1;
    531 
    532         compareseq (0, filevec[0].nondiscarded_lines,
    533                 0, filevec[1].nondiscarded_lines);
     530        bdiagoff = filevec[1].nondiscardedLines + 1;
     531
     532        compareseq (0, filevec[0].nondiscardedLines,
     533                0, filevec[1].nondiscardedLines);
    534534        fdiag = null;
    535535        bdiag = null;
     
    543543       of `struct change's -- an edit script.  */
    544544        return bld.build_script(
    545                 filevec[0].changed_flag,
    546                 filevec[0].buffered_lines,
    547                 filevec[1].changed_flag,
    548                 filevec[1].buffered_lines
     545                filevec[0].changedFlag,
     546                filevec[0].bufferedLines,
     547                filevec[1].changedFlag,
     548                filevec[1].bufferedLines
    549549        );
    550550
     
    607607               Allocate an extra element, always zero, at each end of each vector.
    608608             */
    609             changed_flag = new boolean[buffered_lines + 2];
     609            changedFlag = new boolean[bufferedLines + 2];
    610610        }
    611611
     
    615615         */
    616616        int[] equivCount() {
    617             int[] equiv_count = new int[equiv_max];
    618             for (int i = 0; i < buffered_lines; ++i) {
     617            int[] equiv_count = new int[equivMax];
     618            for (int i = 0; i < bufferedLines; ++i) {
    619619                ++equiv_count[equivs[i]];
    620620            }
     
    658658         */
    659659        private byte[] discardable(final int[] counts) {
    660             final int end = buffered_lines;
     660            final int end = bufferedLines;
    661661            final byte[] discards = new byte[end];
    662662            final int[] equivs = this.equivs;
     
    692692         */
    693693        private void filterDiscards(final byte[] discards) {
    694             final int end = buffered_lines;
     694            final int end = bufferedLines;
    695695
    696696            for (int i = 0; i < end; i++)
     
    808808         */
    809809        private void discard(final byte[] discards) {
    810             final int end = buffered_lines;
     810            final int end = bufferedLines;
    811811            int j = 0;
    812812            for (int i = 0; i < end; ++i)
    813                 if (no_discards || discards[i] == 0)
     813                if (noDiscards || discards[i] == 0)
    814814                {
    815815                    undiscarded[j] = equivs[i];
    816816                    realindexes[j++] = i;
    817817                } else {
    818                     changed_flag[1+i] = true;
    819                 }
    820             nondiscarded_lines = j;
     818                    changedFlag[1+i] = true;
     819                }
     820            nondiscardedLines = j;
    821821        }
    822822
    823823        FileData(int length) {
    824             buffered_lines = length;
     824            bufferedLines = length;
    825825            equivs = new int[length];
    826             undiscarded = new int[buffered_lines];
    827             realindexes = new int[buffered_lines];
     826            undiscarded = new int[bufferedLines];
     827            realindexes = new int[bufferedLines];
    828828        }
    829829
     
    834834                Integer ir = h.get(data[i]);
    835835                if (ir == null) {
    836                     h.put(data[i],equivs[i] = equiv_max++);
     836                    h.put(data[i],equivs[i] = equivMax++);
    837837                } else {
    838838                    equivs[i] = ir.intValue();
     
    855855
    856856        void shift_boundaries(FileData f) {
    857             final boolean[] changed = changed_flag;
    858             final boolean[] other_changed = f.changed_flag;
     857            final boolean[] changed = changedFlag;
     858            final boolean[] other_changed = f.changedFlag;
    859859            int i = 0;
    860860            int j = 0;
    861             int i_end = buffered_lines;
     861            int i_end = bufferedLines;
    862862            int preceding = -1;
    863863            int other_preceding = -1;
     
    930930
    931931        /** Number of elements (lines) in this file. */
    932         private final int buffered_lines;
     932        private final int bufferedLines;
    933933
    934934        /** Vector, indexed by line number, containing an equivalence code for
     
    946946
    947947        /** Total number of nondiscarded lines. */
    948         private int         nondiscarded_lines;
     948        private int         nondiscardedLines;
    949949
    950950        /** Array, indexed by real origin-1 line number,
    951951           containing true for a line that is an insertion or a deletion.
    952952           The results of comparison are stored here.  */
    953         private boolean[]       changed_flag;
     953        private boolean[]       changedFlag;
    954954    }
    955955}
Note: See TracChangeset for help on using the changeset viewer.