Ignore:
Timestamp:
2016-03-17T01:50:12+01:00 (8 years ago)
Author:
Don-vip
Message:

sonar - Local variable and method parameter names should comply with a naming convention

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/QuadBuckets.java

    r9854 r10001  
    9898        }
    9999
    100         QBLevel(QBLevel<T> parent, int parent_index, final QuadBuckets<T> buckets) {
     100        QBLevel(QBLevel<T> parent, int parentIndex, final QuadBuckets<T> buckets) {
    101101            this.parent = parent;
    102102            this.level = parent.level + 1;
    103             this.index = parent_index;
     103            this.index = parentIndex;
    104104            this.buckets = buckets;
    105105
     
    111111                mult = 1 << 30;
    112112            }
    113             long this_quadpart = mult * (parent_index << shift);
    114             this.quad = parent.quad | this_quadpart;
     113            long quadpart = mult * (parentIndex << shift);
     114            this.quad = parent.quad | quadpart;
    115115            this.bbox = calculateBBox(); // calculateBBox reference quad
    116116        }
    117117
    118118        private BBox calculateBBox() {
    119             LatLon bottom_left = this.coor();
    120             double lat = bottom_left.lat() + parent.height() / 2;
    121             double lon = bottom_left.lon() + parent.width() / 2;
    122             return new BBox(bottom_left.lon(), bottom_left.lat(), lon, lat);
     119            LatLon bottomLeft = this.coor();
     120            double lat = bottomLeft.lat() + parent.height() / 2;
     121            double lon = bottomLeft.lon() + parent.width() / 2;
     122            return new BBox(bottomLeft.lon(), bottomLeft.lat(), lon, lat);
    123123        }
    124124
     
    181181        }
    182182
    183         boolean matches(final T o, final BBox search_bbox) {
     183        boolean matches(final T o, final BBox searchBbox) {
    184184            if (o instanceof Node) {
    185185                final LatLon latLon = ((Node) o).getCoor();
    186186                // node without coords -> bbox[0,0,0,0]
    187                 return search_bbox.bounds(latLon != null ? latLon : LatLon.ZERO);
    188             }
    189             return o.getBBox().intersects(search_bbox);
    190         }
    191 
    192         private void search_contents(BBox search_bbox, List<T> result) {
     187                return searchBbox.bounds(latLon != null ? latLon : LatLon.ZERO);
     188            }
     189            return o.getBBox().intersects(searchBbox);
     190        }
     191
     192        private void search_contents(BBox searchBbox, List<T> result) {
    193193            /*
    194194             * It is possible that this was created in a split
     
    199199
    200200            for (T o : content) {
    201                 if (matches(o, search_bbox)) {
     201                if (matches(o, searchBbox)) {
    202202                    result.add(o);
    203203                }
     
    299299        }
    300300
    301         private void search(BBox search_bbox, List<T> result) {
    302             if (!this.bbox().intersects(search_bbox))
     301        private void search(BBox searchBbox, List<T> result) {
     302            if (!this.bbox().intersects(searchBbox))
    303303                return;
    304             else if (bbox().bounds(search_bbox)) {
     304            else if (bbox().bounds(searchBbox)) {
    305305                buckets.searchCache = this;
    306306            }
    307307
    308308            if (this.hasContent()) {
    309                 search_contents(search_bbox, result);
     309                search_contents(searchBbox, result);
    310310            }
    311311
     
    313313
    314314            if (nw != null) {
    315                 nw.search(search_bbox, result);
     315                nw.search(searchBbox, result);
    316316            }
    317317            if (ne != null) {
    318                 ne.search(search_bbox, result);
     318                ne.search(searchBbox, result);
    319319            }
    320320            if (se != null) {
    321                 se.search(search_bbox, result);
     321                se.search(searchBbox, result);
    322322            }
    323323            if (sw != null) {
    324                 sw.search(search_bbox, result);
     324                sw.search(searchBbox, result);
    325325            }
    326326        }
     
    330330        }
    331331
    332         int index_of(QBLevel<T> find_this) {
     332        int index_of(QBLevel<T> findThis) {
    333333            QBLevel<T>[] children = getChildren();
    334334            for (int i = 0; i < QuadTiling.TILES_PER_LEVEL; i++) {
    335                 if (children[i] == find_this)
     335                if (children[i] == findThis)
    336336                    return i;
    337337            }
Note: See TracChangeset for help on using the changeset viewer.