...
 
Commits (7)
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
language: generic language: generic
dist: trusty dist: xenial
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
...@@ -18,23 +18,21 @@ addons_shortcuts: ...@@ -18,23 +18,21 @@ addons_shortcuts:
packages: [ 'libprotobuf-dev','protobuf-compiler', 'clang-3.5' ] packages: [ 'libprotobuf-dev','protobuf-compiler', 'clang-3.5' ]
addons_clang38: &clang38 addons_clang38: &clang38
apt: apt:
sources: [ 'ubuntu-toolchain-r-test', 'llvm-toolchain-trusty-3.8' ]
packages: [ 'libprotobuf-dev','protobuf-compiler', 'clang-3.8' ] packages: [ 'libprotobuf-dev','protobuf-compiler', 'clang-3.8' ]
addons_clang39: &clang39 addons_clang39: &clang39
apt: apt:
sources: [ 'ubuntu-toolchain-r-test', 'llvm-toolchain-trusty-3.9' ]
packages: [ 'libprotobuf-dev','protobuf-compiler', 'clang-3.9' ] packages: [ 'libprotobuf-dev','protobuf-compiler', 'clang-3.9' ]
addons_clang40: &clang40 addons_clang40: &clang40
apt: apt:
sources: [ 'ubuntu-toolchain-r-test', 'llvm-toolchain-trusty-4.0' ] sources: [ 'ubuntu-toolchain-r-test' ]
packages: [ 'libprotobuf-dev','protobuf-compiler', 'clang-4.0' ] packages: [ 'libprotobuf-dev','protobuf-compiler', 'clang-4.0' ]
addons_clang50: &clang50 addons_clang50: &clang50
apt: apt:
sources: [ 'ubuntu-toolchain-r-test', 'llvm-toolchain-trusty-5.0' ] sources: [ 'ubuntu-toolchain-r-test' ]
packages: [ 'libprotobuf-dev','protobuf-compiler', 'clang-5.0' ] packages: [ 'libprotobuf-dev','protobuf-compiler', 'clang-5.0' ]
addons_clang60: &clang60 addons_clang60: &clang60
apt: apt:
sources: [ 'ubuntu-toolchain-r-test', 'llvm-toolchain-trusty-6.0' ] sources: [ 'ubuntu-toolchain-r-test' ]
packages: [ 'libprotobuf-dev','protobuf-compiler', 'clang-6.0', 'clang-tidy-6.0' ] packages: [ 'libprotobuf-dev','protobuf-compiler', 'clang-6.0', 'clang-tidy-6.0' ]
addons_gcc47: &gcc47 addons_gcc47: &gcc47
apt: apt:
...@@ -68,97 +66,118 @@ matrix: ...@@ -68,97 +66,118 @@ matrix:
- os: linux - os: linux
compiler: "clang-3.5" compiler: "clang-3.5"
env: BUILD='Debug' CC=clang-3.5 CXX=clang++-3.5 env: BUILD='Debug' CC=clang-3.5 CXX=clang++-3.5
dist: trusty
addons: *clang35 addons: *clang35
- os: linux - os: linux
compiler: "clang-3.8" compiler: "clang-3.8"
env: BUILD='Debug' CC=clang-3.8 CXX=clang++-3.8 env: BUILD='Debug' CC=clang-3.8 CXX=clang++-3.8
addons: *clang38 addons: *clang38
- os: linux - os: linux
compiler: "clang-3.9" compiler: "clang-3.9"
env: BUILD='Debug' CC=clang-3.9 CXX=clang++-3.9 env: BUILD='Debug' CC=clang-3.9 CXX=clang++-3.9
addons: *clang39 addons: *clang39
- os: linux - os: linux
compiler: "clang-4.0" compiler: "clang-4.0"
env: BUILD='Debug' CC=clang-4.0 CXX=clang++-4.0 env: BUILD='Debug' CC=clang-4.0 CXX=clang++-4.0
addons: *clang40 addons: *clang40
- os: linux - os: linux
compiler: "clang-5.0" compiler: "clang-5.0"
env: BUILD='Debug' CC=clang-5.0 CXX=clang++-5.0 env: BUILD='Debug' CC=clang-5.0 CXX=clang++-5.0
addons: *clang50 addons: *clang50
- os: linux - os: linux
compiler: "clang-6.0" compiler: "clang-6.0"
env: BUILD='Debug' CC=clang-6.0 CXX=clang++-6.0 env: BUILD='Debug' CC=clang-6.0 CXX=clang++-6.0
CLANG_TIDY=clang-tidy-6.0 CLANG_TIDY=clang-tidy-6.0
addons: *clang60 addons: *clang60
- os: linux
compiler: "clang-6.0"
env: BUILD='Release' CC=clang-6.0 CXX=clang++-6.0
addons: *clang60
- os: linux - os: linux
compiler: "clang-6.0" compiler: "clang-6.0"
env: BUILD='Debug' CC=clang-6.0 CXX=clang++-6.0 env: BUILD='Debug' CC=clang-6.0 CXX=clang++-6.0
CXXFLAGS="-fsanitize=address,undefined,integer -fno-sanitize-recover=all -fno-omit-frame-pointer" CXXFLAGS="-fsanitize=address,undefined,integer -fno-sanitize-recover=all -fno-omit-frame-pointer"
LDFLAGS="-fsanitize=address,undefined,integer" LDFLAGS="-fsanitize=address,undefined,integer"
addons: *clang60 addons: *clang60
- os: linux
compiler: "clang-6.0"
env: BUILD='Release' CC=clang-6.0 CXX=clang++-6.0
addons: *clang60
- os: linux - os: linux
compiler: "gcc-4.7" compiler: "gcc-4.7"
env: BUILD='Debug' CC=gcc-4.7 CXX=g++-4.7 env: BUILD='Debug' CC=gcc-4.7 CXX=g++-4.7
dist: trusty
addons: *gcc47 addons: *gcc47
- os: linux - os: linux
compiler: "gcc-4.8" compiler: "gcc-4.8"
env: BUILD='Debug' CC=gcc-4.8 CXX=g++-4.8 env: BUILD='Debug' CC=gcc-4.8 CXX=g++-4.8
dist: trusty
addons: *gcc48 addons: *gcc48
- os: linux - os: linux
compiler: "gcc-4.9" compiler: "gcc-4.9"
env: BUILD='Debug' CC=gcc-4.9 CXX=g++-4.9 env: BUILD='Debug' CC=gcc-4.9 CXX=g++-4.9
COVERAGE=gcov-4.9 dist: trusty
CXXFLAGS="--coverage" LDFLAGS="--coverage"
addons: *gcc49 addons: *gcc49
- os: linux - os: linux
compiler: "gcc-5" compiler: "gcc-5"
env: BUILD='Debug' CC=gcc-5 CXX=g++-5 env: BUILD='Debug' CC=gcc-5 CXX=g++-5
CXXFLAGS="-D_GLIBCXX_USE_CXX11_ABI=0" CXXFLAGS="-D_GLIBCXX_USE_CXX11_ABI=0"
dist: trusty
addons: *gcc5 addons: *gcc5
- os: linux - os: linux
compiler: "gcc-5" compiler: "gcc-5"
env: BUILD='Debug' CC=gcc-5 CXX=g++-5 env: BUILD='Debug' CC=gcc-5 CXX=g++-5
CXXFLAGS="-D_GLIBCXX_USE_CXX11_ABI=1" CXXFLAGS="-D_GLIBCXX_USE_CXX11_ABI=1"
addons: *gcc5 addons: *gcc5
- os: linux - os: linux
compiler: "gcc-6" compiler: "gcc-6"
env: BUILD='Debug' CC=gcc-6 CXX=g++-6 env: BUILD='Debug' CC=gcc-6 CXX=g++-6
addons: *gcc6 addons: *gcc6
- os: linux - os: linux
compiler: "gcc-6" compiler: "gcc-7"
env: BUILD='Debug' CC=gcc-6 CXX=g++-6 env: BUILD='Debug' CC=gcc-7 CXX=g++-7
PROTOZERO_DATA_VIEW=std::experimental::string_view COVERAGE=gcov-7
addons: *gcc6 CXXFLAGS="--coverage" LDFLAGS="--coverage"
- os: linux addons: *gcc7
compiler: "gcc-6"
env: BUILD='Release' CC=gcc-6 CXX=g++-6
addons: *gcc6
- os: linux - os: linux
compiler: "gcc-7" compiler: "gcc-7"
env: BUILD='Debug' CC=gcc-7 CXX=g++-7 env: BUILD='Debug' CC=gcc-7 CXX=g++-7
PROTOZERO_DATA_VIEW=std::experimental::string_view
addons: *gcc7 addons: *gcc7
- os: osx
osx_image: xcode7.3 - os: linux
compiler: clang compiler: "gcc-7"
env: BUILD='Debug' env: BUILD='Release' CC=gcc-7 CXX=g++-7
addons: *gcc7
- os: osx - os: osx
osx_image: xcode8.3 osx_image: xcode8.3
compiler: clang compiler: clang
env: BUILD='Debug' env: BUILD='Debug'
- os: osx - os: osx
osx_image: xcode9.4 osx_image: xcode9.4
compiler: clang compiler: clang
env: BUILD='Debug' env: BUILD='Debug'
- os: osx - os: osx
osx_image: xcode9.4 osx_image: xcode10.1
compiler: clang compiler: clang
env: BUILD='Release' env: BUILD='Debug'
- os: osx - os: osx
osx_image: xcode10 osx_image: xcode10.1
compiler: clang compiler: clang
env: BUILD='Release' env: BUILD='Release'
......
...@@ -15,6 +15,14 @@ This project adheres to [Semantic Versioning](http://semver.org/). ...@@ -15,6 +15,14 @@ This project adheres to [Semantic Versioning](http://semver.org/).
### Fixed ### Fixed
## [1.6.5] - 2018-02-05
### Fixed
- Avoid UB: Do not calculate pointer outside array bounds.
- Specify proto2 syntax in .proto files to appease protoc.
## [1.6.4] - 2018-11-08 ## [1.6.4] - 2018-11-08
### Added ### Added
...@@ -331,7 +339,8 @@ This project adheres to [Semantic Versioning](http://semver.org/). ...@@ -331,7 +339,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- Make pbf reader and writer code endianess-aware. - Make pbf reader and writer code endianess-aware.
[unreleased]: https://github.com/osmcode/libosmium/compare/v1.6.4...HEAD [unreleased]: https://github.com/osmcode/libosmium/compare/v1.6.5...HEAD
[1.6.5]: https://github.com/osmcode/libosmium/compare/v1.6.4...v1.6.5
[1.6.4]: https://github.com/osmcode/libosmium/compare/v1.6.3...v1.6.4 [1.6.4]: https://github.com/osmcode/libosmium/compare/v1.6.3...v1.6.4
[1.6.3]: https://github.com/osmcode/libosmium/compare/v1.6.2...v1.6.3 [1.6.3]: https://github.com/osmcode/libosmium/compare/v1.6.2...v1.6.3
[1.6.2]: https://github.com/osmcode/libosmium/compare/v1.6.1...v1.6.2 [1.6.2]: https://github.com/osmcode/libosmium/compare/v1.6.1...v1.6.2
......
...@@ -14,7 +14,7 @@ project(protozero) ...@@ -14,7 +14,7 @@ project(protozero)
set(PROTOZERO_VERSION_MAJOR 1) set(PROTOZERO_VERSION_MAJOR 1)
set(PROTOZERO_VERSION_MINOR 6) set(PROTOZERO_VERSION_MINOR 6)
set(PROTOZERO_VERSION_PATCH 4) set(PROTOZERO_VERSION_PATCH 5)
set(PROTOZERO_VERSION set(PROTOZERO_VERSION
"${PROTOZERO_VERSION_MAJOR}.${PROTOZERO_VERSION_MINOR}.${PROTOZERO_VERSION_PATCH}") "${PROTOZERO_VERSION_MAJOR}.${PROTOZERO_VERSION_MINOR}.${PROTOZERO_VERSION_PATCH}")
...@@ -26,7 +26,7 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON) ...@@ -26,7 +26,7 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
option(WERROR "Add -Werror flag to build (turns warnings into errors)" ON) option(WERROR "Add -Werror flag to build (turns warnings into errors)" ON)
if(MSVC) if(MSVC)
add_definitions(-std=c++11 /W3) add_definitions(/W3)
add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS) add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS)
else() else()
add_definitions(-std=c++11 -Wall -Wextra -pedantic -Wsign-compare -Wunused-parameter -Wno-float-equal -Wno-covered-switch-default) add_definitions(-std=c++11 -Wall -Wextra -pedantic -Wsign-compare -Wunused-parameter -Wno-float-equal -Wno-covered-switch-default)
......
...@@ -24,6 +24,9 @@ environment: ...@@ -24,6 +24,9 @@ environment:
autocrlf: false autocrlf: false
- config: RelWithDebInfo - config: RelWithDebInfo
autocrlf: false autocrlf: false
- config: Debug
autocrlf: false
platform: x86
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
...@@ -36,17 +39,32 @@ init: ...@@ -36,17 +39,32 @@ init:
# halts: "msys2-runtime and catgets are in conflict. Remove catgets?" # halts: "msys2-runtime and catgets are in conflict. Remove catgets?"
# See also: https://github.com/Alexpux/MSYS2-packages/issues/1141 # See also: https://github.com/Alexpux/MSYS2-packages/issues/1141
install: install:
- if [%config%]==[MSYS2] ( - if "%config%"=="MSYS2" (
C:\msys64\usr\bin\pacman --noconfirm --sync --refresh --refresh --sysupgrade --sysupgrade --ask=20 set "PATH=C:\msys64\mingw64\bin;C:\msys64\usr\bin;%PATH%" &&
&& C:\msys64\usr\bin\pacman -Rc --noconfirm mingw-w64-x86_64-gcc-libs pacman --noconfirm --sync --refresh --refresh --sysupgrade --sysupgrade --ask=20 &&
pacman -Rc --noconfirm mingw-w64-x86_64-gcc-libs &&
pacman -S --needed --noconfirm mingw-w64-x86_64-gcc mingw-w64-x86_64-cmake mingw-w64-x86_64-doxygen mingw-w64-x86_64-protobuf
) )
build_script: build_script:
- if [%config%]==[MSYS2] ( - cd c:\projects\protozero
build-msys2.bat - mkdir build
- cd build
- if "%platform%"=="x64" (
set vcvarsall_arg=amd64
) else (
set vcvarsall_arg=x86
)
- if "%config%"=="MSYS2" (
cmake .. -LA -G "MSYS Makefiles" &&
make VERBOSE=1
) else ( ) else (
build-appveyor.bat "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall" %vcvarsall_arg% &&
cmake .. -LA -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=%config% &&
nmake VERBOSE=1
) )
test_script:
- ctest --output-on-failure
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
@ECHO OFF
SETLOCAL
SET EL=0
ECHO ~~~~~~ %~f0 ~~~~~~
::show all available env vars
SET
ECHO cmake on AppVeyor
cmake -version
ECHO activating VS cmd prompt && CALL "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
IF EXIST build ECHO deleting build dir... && RD /Q /S build
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
MKDIR build
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
CD build
ECHO config^: %config%
SET CMAKE_CMD=cmake .. ^
-LA -G "Visual Studio 15 2017 Win64"
ECHO calling^: %CMAKE_CMD%
%CMAKE_CMD%
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
SET avlogger=
IF /I "%APPVEYOR%"=="True" SET avlogger=/logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
msbuild protozero.sln ^
/p:Configuration=%config% ^
%avlogger%
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
ctest --output-on-failure ^
-C %config% ^
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
GOTO DONE
:ERROR
ECHO ~~~~~~ ERROR %~f0 ~~~~~~
SET EL=%ERRORLEVEL%
:DONE
IF %EL% NEQ 0 ECHO. && ECHO !!! ERRORLEVEL^: %EL% !!! && ECHO.
ECHO ~~~~~~ DONE %~f0 ~~~~~~
EXIT /b %EL%
@ECHO OFF
SETLOCAL
SET EL=0
ECHO =========== %~f0 ===========
SET VERBOSITY_MSBUILD=diagnostic
IF NOT "%1"=="" SET VERBOSITY_MSBUILD=%1
SET platform=x64
SET configuration=Release
CALL build-appveyor.bat %VERBOSITY_MSBUILD%
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
SET platform=x86
SET configuration=Debug
CALL build-appveyor.bat %VERBOSITY_MSBUILD%
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
GOTO DONE
:ERROR
ECHO =========== ERROR %~f0 ===========
ECHO ERRORLEVEL^: %ERRORLEVEL%
SET EL=%ERRORLEVEL%
:DONE
ECHO =========== DONE %~f0 ===========
EXIT /b %EL%
echo "Adding MSYS2 to path..."
SET "PATH=C:\msys64\mingw64\bin;C:\msys64\usr\bin;%PATH%"
echo %PATH%
echo "Installing MSYS2 packages..."
bash -lc "pacman -S --needed --noconfirm mingw-w64-x86_64-gcc mingw-w64-x86_64-cmake mingw-w64-x86_64-doxygen mingw-w64-x86_64-protobuf"
echo "Generating makefiles"
mkdir build
cd build
cmake .. -LA -G "MSYS Makefiles"
echo "Building"
make VERBOSE=1
echo "Testing"
ctest --output-on-failure
protozero (1.6.5-1~bpo9+1) stretch-backports; urgency=medium
* Rebuild for stretch-backports.
-- Bas Couwenberg <sebastic@debian.org> Tue, 12 Feb 2019 06:52:35 +0100
protozero (1.6.5-1) unstable; urgency=medium
* New upstream release.
* Bump Standards-Version to 4.3.0, no changes.
-- Bas Couwenberg <sebastic@debian.org> Wed, 06 Feb 2019 16:25:11 +0100
protozero (1.6.4-1~bpo9+1) stretch-backports; urgency=medium protozero (1.6.4-1~bpo9+1) stretch-backports; urgency=medium
* Rebuild for stretch-backports. * Rebuild for stretch-backports.
......
...@@ -10,7 +10,7 @@ Build-Depends: debhelper (>= 9), ...@@ -10,7 +10,7 @@ Build-Depends: debhelper (>= 9),
libprotobuf-dev, libprotobuf-dev,
protobuf-compiler, protobuf-compiler,
pkg-config pkg-config
Standards-Version: 4.2.1 Standards-Version: 4.3.0
Vcs-Browser: https://salsa.debian.org/debian-gis-team/protozero/ Vcs-Browser: https://salsa.debian.org/debian-gis-team/protozero/
Vcs-Git: https://salsa.debian.org/debian-gis-team/protozero.git -b stretch-backports Vcs-Git: https://salsa.debian.org/debian-gis-team/protozero.git -b stretch-backports
Homepage: https://github.com/mapbox/protozero Homepage: https://github.com/mapbox/protozero
......
...@@ -55,8 +55,8 @@ public: ...@@ -55,8 +55,8 @@ public:
* @param length Length of the data. * @param length Length of the data.
*/ */
constexpr data_view(const char* ptr, std::size_t length) noexcept constexpr data_view(const char* ptr, std::size_t length) noexcept
: m_data(ptr), : m_data{ptr},
m_size(length) { m_size{length} {
} }
/** /**
...@@ -65,8 +65,8 @@ public: ...@@ -65,8 +65,8 @@ public:
* @param str String with the data. * @param str String with the data.
*/ */
data_view(const std::string& str) noexcept // NOLINT(google-explicit-constructor, hicpp-explicit-conversions) data_view(const std::string& str) noexcept // NOLINT(google-explicit-constructor, hicpp-explicit-conversions)
: m_data(str.data()), : m_data{str.data()},
m_size(str.size()) { m_size{str.size()} {
} }
/** /**
...@@ -75,8 +75,8 @@ public: ...@@ -75,8 +75,8 @@ public:
* @param ptr Pointer to the data. * @param ptr Pointer to the data.
*/ */
data_view(const char* ptr) noexcept // NOLINT(google-explicit-constructor, hicpp-explicit-conversions) data_view(const char* ptr) noexcept // NOLINT(google-explicit-constructor, hicpp-explicit-conversions)
: m_data(ptr), : m_data{ptr},
m_size(std::strlen(ptr)) { m_size{std::strlen(ptr)} {
} }
/** /**
......
...@@ -56,7 +56,7 @@ public: ...@@ -56,7 +56,7 @@ public:
* Default constructor. Create empty iterator_range. * Default constructor. Create empty iterator_range.
*/ */
constexpr iterator_range() : constexpr iterator_range() :
P(iterator{}, iterator{}) { P{iterator{}, iterator{}} {
} }
/** /**
...@@ -66,8 +66,8 @@ public: ...@@ -66,8 +66,8 @@ public:
* @param last_iterator Iterator to end of range. * @param last_iterator Iterator to end of range.
*/ */
constexpr iterator_range(iterator&& first_iterator, iterator&& last_iterator) : constexpr iterator_range(iterator&& first_iterator, iterator&& last_iterator) :
P(std::forward<iterator>(first_iterator), P{std::forward<iterator>(first_iterator),
std::forward<iterator>(last_iterator)) { std::forward<iterator>(last_iterator)} {
} }
/// Return iterator to beginning of range. /// Return iterator to beginning of range.
...@@ -175,7 +175,7 @@ public: ...@@ -175,7 +175,7 @@ public:
const_fixed_iterator() noexcept = default; const_fixed_iterator() noexcept = default;
explicit const_fixed_iterator(const char* data) noexcept : explicit const_fixed_iterator(const char* data) noexcept :
m_data(data) { m_data{data} {
} }
const_fixed_iterator(const const_fixed_iterator&) noexcept = default; const_fixed_iterator(const const_fixed_iterator&) noexcept = default;
...@@ -323,8 +323,8 @@ public: ...@@ -323,8 +323,8 @@ public:
const_varint_iterator() noexcept = default; const_varint_iterator() noexcept = default;
const_varint_iterator(const char* data, const char* end) noexcept : const_varint_iterator(const char* data, const char* end) noexcept :
m_data(data), m_data{data},
m_end(end) { m_end{end} {
} }
const_varint_iterator(const const_varint_iterator&) noexcept = default; const_varint_iterator(const const_varint_iterator&) noexcept = default;
...@@ -384,11 +384,11 @@ public: ...@@ -384,11 +384,11 @@ public:
using reference = value_type&; using reference = value_type&;
const_svarint_iterator() noexcept : const_svarint_iterator() noexcept :
const_varint_iterator<T>() { const_varint_iterator<T>{} {
} }
const_svarint_iterator(const char* data, const char* end) noexcept : const_svarint_iterator(const char* data, const char* end) noexcept :
const_varint_iterator<T>(data, end) { const_varint_iterator<T>{data, end} {
} }
const_svarint_iterator(const const_svarint_iterator&) = default; const_svarint_iterator(const const_svarint_iterator&) = default;
......
...@@ -55,7 +55,7 @@ public: ...@@ -55,7 +55,7 @@ public:
* doesn't have to be empty. The pbf_message object will just append data. * doesn't have to be empty. The pbf_message object will just append data.
*/ */
explicit pbf_builder(std::string& data) noexcept : explicit pbf_builder(std::string& data) noexcept :
pbf_writer(data) { pbf_writer{data} {
} }
/** /**
...@@ -67,7 +67,7 @@ public: ...@@ -67,7 +67,7 @@ public:
*/ */
template <typename P> template <typename P>
pbf_builder(pbf_writer& parent_writer, P tag) noexcept : pbf_builder(pbf_writer& parent_writer, P tag) noexcept :
pbf_writer(parent_writer, pbf_tag_type(tag)) { pbf_writer{parent_writer, pbf_tag_type(tag)} {
} }
/// @cond INTERNAL /// @cond INTERNAL
......
...@@ -78,7 +78,7 @@ public: ...@@ -78,7 +78,7 @@ public:
*/ */
template <typename... Args> template <typename... Args>
pbf_message(Args&&... args) noexcept : // NOLINT(google-explicit-constructor, hicpp-explicit-conversions) pbf_message(Args&&... args) noexcept : // NOLINT(google-explicit-constructor, hicpp-explicit-conversions)
pbf_reader(std::forward<Args>(args)...) { pbf_reader{std::forward<Args>(args)...} {
} }
/** /**
......
...@@ -153,8 +153,8 @@ public: ...@@ -153,8 +153,8 @@ public:
* @post There is no current field. * @post There is no current field.
*/ */
explicit pbf_reader(const data_view& view) noexcept explicit pbf_reader(const data_view& view) noexcept
: m_data(view.data()), : m_data{view.data()},
m_end(view.data() + view.size()) { m_end{view.data() + view.size()} {
} }
/** /**
...@@ -168,8 +168,8 @@ public: ...@@ -168,8 +168,8 @@ public:
* @post There is no current field. * @post There is no current field.
*/ */
pbf_reader(const char* data, std::size_t size) noexcept pbf_reader(const char* data, std::size_t size) noexcept
: m_data(data), : m_data{data},
m_end(data + size) { m_end{data + size} {
} }
#ifndef PROTOZERO_STRICT_API #ifndef PROTOZERO_STRICT_API
...@@ -185,8 +185,8 @@ public: ...@@ -185,8 +185,8 @@ public:
* @deprecated Use one of the other constructors. * @deprecated Use one of the other constructors.
*/ */
explicit pbf_reader(const std::pair<const char*, std::size_t>& data) noexcept explicit pbf_reader(const std::pair<const char*, std::size_t>& data) noexcept
: m_data(data.first), : m_data{data.first},
m_end(data.first + data.second) { m_end{data.first + data.second} {
} }
#endif #endif
...@@ -201,8 +201,8 @@ public: ...@@ -201,8 +201,8 @@ public:
* @post There is no current field. * @post There is no current field.
*/ */
explicit pbf_reader(const std::string& data) noexcept explicit pbf_reader(const std::string& data) noexcept
: m_data(data.data()), : m_data{data.data()},
m_end(data.data() + data.size()) { m_end{data.data() + data.size()} {
} }
/** /**
......
...@@ -227,7 +227,7 @@ public: ...@@ -227,7 +227,7 @@ public:
* doesn't have to be empty. The pbf_writer will just append data. * doesn't have to be empty. The pbf_writer will just append data.
*/ */
explicit pbf_writer(std::string& data) noexcept : explicit pbf_writer(std::string& data) noexcept :
m_data(&data) { m_data{&data} {
} }
/** /**
...@@ -247,8 +247,8 @@ public: ...@@ -247,8 +247,8 @@ public:
* a few very specific cases. * a few very specific cases.
*/ */
pbf_writer(pbf_writer& parent_writer, pbf_tag_type tag, std::size_t size=0) : pbf_writer(pbf_writer& parent_writer, pbf_tag_type tag, std::size_t size=0) :
m_data(parent_writer.m_data), m_data{parent_writer.m_data},
m_parent_writer(&parent_writer) { m_parent_writer{&parent_writer} {
m_parent_writer->open_submessage(tag, size); m_parent_writer->open_submessage(tag, size);
} }
...@@ -263,10 +263,10 @@ public: ...@@ -263,10 +263,10 @@ public:
* be invalid. * be invalid.
*/ */
pbf_writer(pbf_writer&& other) noexcept : pbf_writer(pbf_writer&& other) noexcept :
m_data(other.m_data), m_data{other.m_data},
m_parent_writer(other.m_parent_writer), m_parent_writer{other.m_parent_writer},
m_rollback_pos(other.m_rollback_pos), m_rollback_pos{other.m_rollback_pos},
m_pos(other.m_pos) { m_pos{other.m_pos} {
other.m_data = nullptr; other.m_data = nullptr;
other.m_parent_writer = nullptr; other.m_parent_writer = nullptr;
other.m_rollback_pos = 0; other.m_rollback_pos = 0;
...@@ -941,11 +941,11 @@ namespace detail { ...@@ -941,11 +941,11 @@ namespace detail {
packed_field() = default; packed_field() = default;
packed_field(pbf_writer& parent_writer, pbf_tag_type tag) : packed_field(pbf_writer& parent_writer, pbf_tag_type tag) :
m_writer(parent_writer, tag) { m_writer{parent_writer, tag} {
} }
packed_field(pbf_writer& parent_writer, pbf_tag_type tag, std::size_t size) : packed_field(pbf_writer& parent_writer, pbf_tag_type tag, std::size_t size) :
m_writer(parent_writer, tag, size) { m_writer{parent_writer, tag, size} {
} }
~packed_field() noexcept = default; ~packed_field() noexcept = default;
...@@ -970,17 +970,17 @@ namespace detail { ...@@ -970,17 +970,17 @@ namespace detail {
public: public:
packed_field_fixed() : packed_field_fixed() :
packed_field() { packed_field{} {
} }
template <typename P> template <typename P>
packed_field_fixed(pbf_writer& parent_writer, P tag) : packed_field_fixed(pbf_writer& parent_writer, P tag) :
packed_field(parent_writer, static_cast<pbf_tag_type>(tag)) { packed_field{parent_writer, static_cast<pbf_tag_type>(tag)} {
} }
template <typename P> template <typename P>
packed_field_fixed(pbf_writer& parent_writer, P tag, std::size_t size) : packed_field_fixed(pbf_writer& parent_writer, P tag, std::size_t size) :
packed_field(parent_writer, static_cast<pbf_tag_type>(tag), size * sizeof(T)) { packed_field{parent_writer, static_cast<pbf_tag_type>(tag), size * sizeof(T)} {
} }
void add_element(T value) { void add_element(T value) {
...@@ -995,12 +995,12 @@ namespace detail { ...@@ -995,12 +995,12 @@ namespace detail {
public: public:
packed_field_varint() : packed_field_varint() :
packed_field() { packed_field{} {
} }
template <typename P> template <typename P>
packed_field_varint(pbf_writer& parent_writer, P tag) : packed_field_varint(pbf_writer& parent_writer, P tag) :
packed_field(parent_writer, static_cast<pbf_tag_type>(tag)) { packed_field{parent_writer, static_cast<pbf_tag_type>(tag)} {
} }
void add_element(T value) { void add_element(T value) {
...@@ -1015,12 +1015,12 @@ namespace detail { ...@@ -1015,12 +1015,12 @@ namespace detail {
public: public:
packed_field_svarint() : packed_field_svarint() :
packed_field() { packed_field{} {
} }
template <typename P> template <typename P>
packed_field_svarint(pbf_writer& parent_writer, P tag) : packed_field_svarint(pbf_writer& parent_writer, P tag) :
packed_field(parent_writer, static_cast<pbf_tag_type>(tag)) { packed_field{parent_writer, static_cast<pbf_tag_type>(tag)} {
} }
void add_element(T value) { void add_element(T value) {
......
...@@ -118,7 +118,7 @@ inline void skip_varint(const char** data, const char* end) { ...@@ -118,7 +118,7 @@ inline void skip_varint(const char** data, const char* end) {
++p; ++p;
} }
if (p >= begin + max_varint_length) { if (p - begin >= max_varint_length) {
throw varint_too_long_exception{}; throw varint_too_long_exception{};
} }
......
...@@ -23,12 +23,12 @@ documentation. ...@@ -23,12 +23,12 @@ documentation.
#define PROTOZERO_VERSION_MINOR 6 #define PROTOZERO_VERSION_MINOR 6
/// The patch number /// The patch number
#define PROTOZERO_VERSION_PATCH 4 #define PROTOZERO_VERSION_PATCH 5
/// The complete version number /// The complete version number
#define PROTOZERO_VERSION_CODE (PROTOZERO_VERSION_MAJOR * 10000 + PROTOZERO_VERSION_MINOR * 100 + PROTOZERO_VERSION_PATCH) #define PROTOZERO_VERSION_CODE (PROTOZERO_VERSION_MAJOR * 10000 + PROTOZERO_VERSION_MINOR * 100 + PROTOZERO_VERSION_PATCH)
/// Version number as string /// Version number as string
#define PROTOZERO_VERSION_STRING "1.6.4" #define PROTOZERO_VERSION_STRING "1.6.5"
#endif // PROTOZERO_VERSION_HPP #endif // PROTOZERO_VERSION_HPP
syntax = "proto2";
option optimize_for = LITE_RUNTIME; option optimize_for = LITE_RUNTIME;
......
syntax = "proto2";
option optimize_for = LITE_RUNTIME; option optimize_for = LITE_RUNTIME;
......
syntax = "proto2";
option optimize_for = LITE_RUNTIME; option optimize_for = LITE_RUNTIME;
......
syntax = "proto2";
option optimize_for = LITE_RUNTIME; option optimize_for = LITE_RUNTIME;
......
syntax = "proto2";
option optimize_for = LITE_RUNTIME; option optimize_for = LITE_RUNTIME;
......
syntax = "proto2";
option optimize_for = LITE_RUNTIME; option optimize_for = LITE_RUNTIME;
......
syntax = "proto2";
option optimize_for = LITE_RUNTIME; option optimize_for = LITE_RUNTIME;
......
syntax = "proto2";
option optimize_for = LITE_RUNTIME; option optimize_for = LITE_RUNTIME;
......
syntax = "proto2";
option optimize_for = LITE_RUNTIME; option optimize_for = LITE_RUNTIME;
......
syntax = "proto2";
option optimize_for = LITE_RUNTIME; option optimize_for = LITE_RUNTIME;
......
syntax = "proto2";
option optimize_for = LITE_RUNTIME; option optimize_for = LITE_RUNTIME;
......
syntax = "proto2";
option optimize_for = LITE_RUNTIME; option optimize_for = LITE_RUNTIME;
......
syntax = "proto2";
option optimize_for = LITE_RUNTIME; option optimize_for = LITE_RUNTIME;
......
syntax = "proto2";
option optimize_for = LITE_RUNTIME; option optimize_for = LITE_RUNTIME;
......
syntax = "proto2";
option optimize_for = LITE_RUNTIME; option optimize_for = LITE_RUNTIME;
......