[libosmium] 01/04: Imported Upstream version 2.4.1

Sebastiaan Couwenberg sebastic at moszumanska.debian.org
Sat Aug 29 14:55:57 UTC 2015


This is an automated email from the git hooks/post-receive script.

sebastic pushed a commit to branch master
in repository libosmium.

commit d90f498f685f6e8c251fed8f6a5d87a753fc3e5c
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Sat Aug 29 16:41:58 2015 +0200

    Imported Upstream version 2.4.1
---
 CHANGELOG.md                    | 10 +++++++++-
 CMakeLists.txt                  |  2 +-
 include/osmium/osm/crc.hpp      |  6 +++++-
 test/t/basic/test_changeset.cpp |  2 +-
 test/t/basic/test_node.cpp      |  2 +-
 test/t/basic/test_relation.cpp  |  2 +-
 test/t/basic/test_way.cpp       |  2 +-
 7 files changed, 19 insertions(+), 7 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9b7bd8d..2ce0c5c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -13,6 +13,13 @@ This project adheres to [Semantic Versioning](http://semver.org/).
 ### Fixed
 
 
+## [2.4.1] - 2015-08-29
+
+### Fixed
+
+- CRC calculation of tags and changesets.
+
+
 ## [2.4.0] - 2015-08-29
 
 ### Added
@@ -137,7 +144,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
   Doxygen (up to version 1.8.8). This version contains a workaround to fix
   this.
 
-[unreleased]: https://github.com/osmcode/libosmium/compare/v2.4.0...HEAD
+[unreleased]: https://github.com/osmcode/libosmium/compare/v2.4.1...HEAD
+[2.4.1]: https://github.com/osmcode/libosmium/compare/v2.4.0...v2.4.1
 [2.4.0]: https://github.com/osmcode/libosmium/compare/v2.3.0...v2.4.0
 [2.3.0]: https://github.com/osmcode/libosmium/compare/v2.2.0...v2.3.0
 [2.2.0]: https://github.com/osmcode/libosmium/compare/v2.1.0...v2.2.0
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fc08036..129029f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -27,7 +27,7 @@ project(libosmium)
 
 set(LIBOSMIUM_VERSION_MAJOR 2)
 set(LIBOSMIUM_VERSION_MINOR 4)
-set(LIBOSMIUM_VERSION_PATCH 0)
+set(LIBOSMIUM_VERSION_PATCH 1)
 
 set(LIBOSMIUM_VERSION
     "${LIBOSMIUM_VERSION_MAJOR}.${LIBOSMIUM_VERSION_MINOR}.${LIBOSMIUM_VERSION_PATCH}")
diff --git a/include/osmium/osm/crc.hpp b/include/osmium/osm/crc.hpp
index 61ef249..fc87994 100644
--- a/include/osmium/osm/crc.hpp
+++ b/include/osmium/osm/crc.hpp
@@ -160,7 +160,10 @@ namespace osmium {
         }
 
         void update(const TagList& tags) {
-            m_crc.process_bytes(tags.data(), tags.byte_size());
+            for (const Tag& tag : tags) {
+                update_string(tag.key());
+                update_string(tag.value());
+            }
         }
 
         void update(const osmium::RelationMember& member) {
@@ -218,6 +221,7 @@ namespace osmium {
             update_int32(changeset.num_changes());
             update_int32(changeset.uid());
             update_string(changeset.user());
+            update(changeset.tags());
         }
 
     }; // class CRC
diff --git a/test/t/basic/test_changeset.cpp b/test/t/basic/test_changeset.cpp
index fc9f1bd..d214698 100644
--- a/test/t/basic/test_changeset.cpp
+++ b/test/t/basic/test_changeset.cpp
@@ -33,7 +33,7 @@ TEST_CASE("Basic Changeset") {
     REQUIRE(std::string("user") == cs1.user());
 
     crc32.update(cs1);
-    REQUIRE(crc32().checksum() == 0xf44aff25);
+    REQUIRE(crc32().checksum() == 0xda0cd932);
 
     osmium::Changeset& cs2 = buffer_add_changeset(buffer,
         "user",
diff --git a/test/t/basic/test_node.cpp b/test/t/basic/test_node.cpp
index db5b4cd..750ad39 100644
--- a/test/t/basic/test_node.cpp
+++ b/test/t/basic/test_node.cpp
@@ -42,7 +42,7 @@ SECTION("node_builder") {
     REQUIRE(2 == node.tags().size());
 
     crc32.update(node);
-    REQUIRE(crc32().checksum() == 0xc696802f);
+    REQUIRE(crc32().checksum() == 0x7dc553f9);
 
     node.set_visible(false);
     REQUIRE(false == node.visible());
diff --git a/test/t/basic/test_relation.cpp b/test/t/basic/test_relation.cpp
index 4b608ff..5419d5e 100644
--- a/test/t/basic/test_relation.cpp
+++ b/test/t/basic/test_relation.cpp
@@ -61,7 +61,7 @@ TEST_CASE("Build relation") {
     }
 
     crc32.update(relation);
-    REQUIRE(crc32().checksum() == 0xebcd836d);
+    REQUIRE(crc32().checksum() == 0x2c2352e);
 }
 
 TEST_CASE("Member role too long") {
diff --git a/test/t/basic/test_way.cpp b/test/t/basic/test_way.cpp
index 7c7bc21..c8f651f 100644
--- a/test/t/basic/test_way.cpp
+++ b/test/t/basic/test_way.cpp
@@ -45,7 +45,7 @@ SECTION("way_builder") {
     REQUIRE(! way.is_closed());
 
     crc32.update(way);
-    REQUIRE(crc32().checksum() == 0x20fe7a30);
+    REQUIRE(crc32().checksum() == 0x7676d0c2);
 }
 
 SECTION("closed_way") {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/libosmium.git



More information about the Pkg-grass-devel mailing list