Skip to content

Commit 3ae62c4

Browse files
committed
removed unused methods encoder.defineNodeBits/setNodeBitMask/getNodeBitMask
1 parent 7cf8f3f commit 3ae62c4

File tree

2 files changed

+1
-28
lines changed

2 files changed

+1
-28
lines changed

core/src/main/java/com/graphhopper/routing/util/AbstractFlagEncoder.java

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,6 @@ public abstract class AbstractFlagEncoder implements FlagEncoder {
6161
// This value determines the maximal possible speed of any road regardless of the maxspeed value
6262
// lower values allow more compact representation of the routing graph
6363
protected int maxPossibleSpeed;
64-
/* Edge Flag Encoder fields */
65-
private long nodeBitMask;
6664
private boolean blockByDefault = true;
6765
private boolean blockFords = true;
6866
private boolean registered;
@@ -140,23 +138,11 @@ public ConditionalTagInspector getConditionalTagInspector() {
140138
return conditionalTagInspector;
141139
}
142140

143-
/**
144-
* Defines the bits for the node flags, which are currently used for barriers only.
145-
* <p>
146-
*
147-
* @return incremented shift value pointing behind the last used bit
148-
*/
149-
public int defineNodeBits(int index, int shift) {
150-
return shift;
151-
}
152-
153141
/**
154142
* Defines bits used for edge flags used for access, speed etc.
155-
*
156-
* @return incremented shift value pointing behind the last used bit
157143
*/
158144
public void createEncodedValues(List<EncodedValue> registerNewEncodedValue, String prefix, int index) {
159-
// define the first 2 speedBits in flags for routing
145+
// define the first 2 bits in flags for access
160146
registerNewEncodedValue.add(accessEnc = new SimpleBooleanEncodedValue(EncodingManager.getKey(prefix, "access"), true));
161147
roundaboutEnc = getBooleanEncodedValue(Roundabout.KEY);
162148
encoderBit = 1L << index;
@@ -389,15 +375,6 @@ protected double getFerrySpeed(ReaderWay way) {
389375
}
390376
}
391377

392-
void setNodeBitMask(int usedBits, int shift) {
393-
nodeBitMask = (1L << usedBits) - 1;
394-
nodeBitMask <<= shift;
395-
}
396-
397-
long getNodeBitMask() {
398-
return nodeBitMask;
399-
}
400-
401378
public final DecimalEncodedValue getAverageSpeedEnc() {
402379
if (avgSpeedEnc == null)
403380
throw new NullPointerException("FlagEncoder " + toString() + " not yet initialized");

core/src/main/java/com/graphhopper/routing/util/EncodingManager.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ public class EncodingManager implements EncodedValueLookup {
5050
private final List<RelationTagParser> relationTagParsers = new ArrayList<>();
5151
private final List<TagParser> edgeTagParsers = new ArrayList<>();
5252
private final Map<String, TurnCostParser> turnCostParsers = new LinkedHashMap<>();
53-
private int nextNodeBit = 0;
5453
private boolean enableInstructions = true;
5554
private String preferredLanguage = "";
5655
private EncodedValue.InitializerConfig turnCostConfig;
@@ -459,9 +458,6 @@ private void addEncoder(AbstractFlagEncoder encoder) {
459458
}
460459

461460
int encoderCount = edgeEncoders.size();
462-
int usedBits = encoder.defineNodeBits(encoderCount, nextNodeBit);
463-
encoder.setNodeBitMask(usedBits - nextNodeBit, nextNodeBit);
464-
nextNodeBit = usedBits;
465461

466462
encoder.setEncodedValueLookup(this);
467463
List<EncodedValue> list = new ArrayList<>();

0 commit comments

Comments
 (0)