This is an automated email from the git hooks/post-receive script. sebastic pushed a commit to branch master in repository protozero.
commit 6ff79b07aa95d7687ebb274159f0f201a2ba4086 Author: Bas Couwenberg <sebas...@xs4all.nl> Date: Mon Oct 12 22:25:49 2015 +0200 Imported Upstream version 1.2.1 --- CHANGELOG.md | 10 +++++++++- Makefile | 2 +- include/protozero/byteswap.hpp | 10 +--------- include/protozero/version.hpp | 4 ++-- test/t/endian/test_cases.cpp | 15 --------------- 5 files changed, 13 insertions(+), 28 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dfe0dbd..2649f89 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,13 @@ This project adheres to [Semantic Versioning](http://semver.org/). ### Fixed +## [1.2.1] - 2015-10-12 + +### Fixed + +- Removed unneeded code (1-byte "swap") which lead to test failures. + + ## [1.2.0] - 2015-10-08 ### Added @@ -34,7 +41,8 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Make pbf reader and writer code endianess-aware. -[unreleased]: https://github.com/osmcode/libosmium/compare/v1.2.0...HEAD +[unreleased]: https://github.com/osmcode/libosmium/compare/v1.2.1...HEAD +[1.2.1]: https://github.com/osmcode/libosmium/compare/v1.2.0...v1.2.1 [1.2.0]: https://github.com/osmcode/libosmium/compare/v1.1.0...v1.2.0 [1.1.0]: https://github.com/osmcode/libosmium/compare/v1.0.0...v1.1.0 diff --git a/Makefile b/Makefile index 1141d07..801897c 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ LDFLAGS := $(LDFLAGS) WARNING_FLAGS := -Wall -Wextra -pedantic -Wsign-compare -Wsign-conversion -Wunused-parameter -Wno-float-equal -Wno-covered-switch-default ifneq ($(findstring clang,$(CXX)),) - WARNING_FLAGS += -Wno-reserved-id-macro -Weverything -Wno-weak-vtables -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-exit-time-destructors -Wno-switch-enum -Wno-padded + WARNING_FLAGS += -Wno-reserved-id-macro -Weverything -Wno-weak-vtables -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-exit-time-destructors -Wno-switch-enum -Wno-padded -Wno-documentation-unknown-command endif COMMON_FLAGS := -fvisibility-inlines-hidden -std=c++11 $(WARNING_FLAGS) diff --git a/include/protozero/byteswap.hpp b/include/protozero/byteswap.hpp index 2082952..29c312a 100644 --- a/include/protozero/byteswap.hpp +++ b/include/protozero/byteswap.hpp @@ -27,15 +27,7 @@ namespace protozero { */ template <int N> inline void byteswap(const char* /*data*/, char* /*result*/) { - static_assert(N == 1, "Can only swap 1, 4, or 8 byte values"); -} - -/** - * Swap 1 byte value between endianness formats. (Basically just a copy). - */ -template <> -inline void byteswap<1>(const char* data, char* result) { - result[0] = data[0]; + static_assert(N == 1, "Can only swap 4 or 8 byte values"); } /** diff --git a/include/protozero/version.hpp b/include/protozero/version.hpp index c8e45bb..1d82b7a 100644 --- a/include/protozero/version.hpp +++ b/include/protozero/version.hpp @@ -12,11 +12,11 @@ documentation. #define PROTOZERO_VERSION_MAJOR 1 #define PROTOZERO_VERSION_MINOR 2 -#define PROTOZERO_VERSION_PATCH 0 +#define PROTOZERO_VERSION_PATCH 1 #define PROTOZERO_VERSION_CODE (PROTOZERO_VERSION_MAJOR * 10000 + PROTOZERO_VERSION_MINOR * 100 + PROTOZERO_VERSION_PATCH) -#define PROTOZERO_VERSION_STRING "1.2.0" +#define PROTOZERO_VERSION_STRING "1.2.1" #endif // PROTOZERO_VERSION_HPP diff --git a/test/t/endian/test_cases.cpp b/test/t/endian/test_cases.cpp index 0c0feb0..fc69879 100644 --- a/test/t/endian/test_cases.cpp +++ b/test/t/endian/test_cases.cpp @@ -7,16 +7,6 @@ namespace { - char check_swap_1(char data) { - char swapped; - char back; - - protozero::byteswap<1>(&data, &swapped); - protozero::byteswap<1>(&swapped, &back); - - return back; - } - int32_t check_swap_4(int32_t data) { int32_t swapped; int32_t back; @@ -40,11 +30,6 @@ namespace { } TEST_CASE("byte swapping") { - REQUIRE(0 == check_swap_1(0)); - REQUIRE(1 == check_swap_1(1)); - REQUIRE(-1 == check_swap_1(-1)); - REQUIRE(127 == check_swap_1(127)); - REQUIRE(0 == check_swap_4(0)); REQUIRE(1 == check_swap_4(1)); REQUIRE(-1 == check_swap_4(-1)); -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/protozero.git _______________________________________________ Pkg-grass-devel mailing list Pkg-grass-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-grass-devel