Changeset 10660 in josm for trunk/src/org


Ignore:
Timestamp:
2016-07-27T23:18:28+02:00 (8 years ago)
Author:
Don-vip
Message:

see #13225 - fix ImproveWayaccuracy mode (partial revert of r10656)

File:
1 edited

Legend:

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

    r10657 r10660  
    10051005    /**
    10061006     * Add new referrer. If referrer is already included then no action is taken
    1007      * @param referrer The referrer to add. Must not be null
    1008      * @throws NullPointerException if {@code referrer} is null
     1007     * @param referrer The referrer to add
    10091008     */
    10101009    protected void addReferrer(OsmPrimitive referrer) {
     
    10121011            referrers = referrer;
    10131012        } else if (referrers instanceof OsmPrimitive) {
    1014             if (!referrer.equals(referrers)) {
     1013            if (referrers != referrer) {
    10151014                referrers = new OsmPrimitive[] {(OsmPrimitive) referrers, referrer};
    10161015            }
    10171016        } else {
    10181017            for (OsmPrimitive primitive:(OsmPrimitive[]) referrers) {
    1019                 if (referrer.equals(primitive))
     1018                if (primitive == referrer)
    10201019                    return;
    10211020            }
     
    10261025    /**
    10271026     * Remove referrer. No action is taken if referrer is not registered
    1028      * @param referrer The referrer to remove. Must not be null
    1029      * @throws NullPointerException if {@code referrer} is null
     1027     * @param referrer The referrer to remove
    10301028     */
    10311029    protected void removeReferrer(OsmPrimitive referrer) {
    10321030        if (referrers instanceof OsmPrimitive) {
    1033             if (referrer.equals(referrers)) {
     1031            if (referrers == referrer) {
    10341032                referrers = null;
    10351033            }
     
    10381036            int idx = -1;
    10391037            for (int i = 0; i < orig.length; i++) {
    1040                 if (referrer.equals(orig[i])) {
     1038                if (orig[i] == referrer) {
    10411039                    idx = i;
    10421040                    break;
Note: See TracChangeset for help on using the changeset viewer.