Changeset 18826 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2023-09-12T18:04:57+02:00 (14 months ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/protobuf/ProtobufParser.java
r18695 r18826 52 52 * @param start The start position in the byte array 53 53 * @param end The end position in the byte array (exclusive - [start, end) ) 54 * @return t 55 * he number from the byte array. Depending upon length of time the number will be stored, narrowing may be helpful. 54 * @return the number from the byte array. Depending upon length of time the number will be stored, narrowing may be helpful. 56 55 * @since 18695 57 56 */ … … 101 100 */ 102 101 public static long decodeZigZag(long signed) { 103 return (signed >> 1) ^ -(signed & 1);102 return (signed >>> 1) ^ -(signed & 1); 104 103 } 105 104 -
trunk/src/org/openstreetmap/josm/io/OsmPbfReader.java
r18702 r18826 632 632 switch (protobufRecord.getField()) { 633 633 case 1: 634 id = protobufRecord.asUnsignedVarInt(). intValue();634 id = protobufRecord.asUnsignedVarInt().longValue(); 635 635 break; 636 636 case 2: … … 699 699 switch (protobufRecord.getField()) { 700 700 case 1: 701 id = protobufRecord.asUnsignedVarInt(). intValue();701 id = protobufRecord.asUnsignedVarInt().longValue(); 702 702 break; 703 703 case 2: … … 838 838 */ 839 839 private static void setOsmPrimitiveData(PrimitiveBlockRecord primitiveBlockRecord, PrimitiveData primitive, Info info) { 840 if (info.changeset() != null) {841 primitive.setChangesetId(Math.toIntExact(info.changeset()));842 }843 840 primitive.setVisible(info.isVisible()); 844 841 if (info.timestamp() != null) { … … 852 849 if (info.version() > 0) { 853 850 primitive.setVersion(info.version()); 851 } 852 if (info.changeset() != null) { 853 primitive.setChangesetId(Math.toIntExact(info.changeset())); 854 854 } 855 855 }
Note:
See TracChangeset
for help on using the changeset viewer.