Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion contrib/catch2/README.contrib
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Source: https://github.com/catchorg/Catch2
Revision: v2.13.7
Revision: v2.13.8
113 changes: 60 additions & 53 deletions contrib/catch2/include/catch.hpp

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion contrib/protozero/README.contrib
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Source: https://github.com/mapbox/protozero
Revision: v1.7.0
Revision: v1.7.1
4 changes: 3 additions & 1 deletion contrib/protozero/include/protozero/buffer_string.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ documentation.
*/

#include "buffer_tmpl.hpp"
#include "config.hpp"

#include <cstddef>
#include <iterator>
Expand Down Expand Up @@ -56,7 +57,8 @@ struct buffer_customization<std::string> {
protozero_assert(from <= buffer->size());
protozero_assert(to <= buffer->size());
protozero_assert(from <= to);
buffer->erase(std::next(buffer->begin(), from), std::next(buffer->begin(), to));
buffer->erase(std::next(buffer->begin(), static_cast<std::string::iterator::difference_type>(from)),
std::next(buffer->begin(), static_cast<std::string::iterator::difference_type>(to)));
}

static char* at_pos(std::string* buffer, std::size_t pos) {
Expand Down
4 changes: 3 additions & 1 deletion contrib/protozero/include/protozero/buffer_vector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ documentation.
*/

#include "buffer_tmpl.hpp"
#include "config.hpp"

#include <cstddef>
#include <iterator>
Expand Down Expand Up @@ -56,7 +57,8 @@ struct buffer_customization<std::vector<char>> {
protozero_assert(from <= buffer->size());
protozero_assert(to <= buffer->size());
protozero_assert(from <= to);
buffer->erase(std::next(buffer->begin(), from), std::next(buffer->begin(), to));
buffer->erase(std::next(buffer->begin(), static_cast<std::string::iterator::difference_type>(from)),
std::next(buffer->begin(), static_cast<std::string::iterator::difference_type>(to)));
}

static char* at_pos(std::vector<char>* buffer, std::size_t pos) {
Expand Down
17 changes: 13 additions & 4 deletions contrib/protozero/include/protozero/byteswap.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ documentation.
#include "config.hpp"

#include <cstdint>
#include <cstring>

namespace protozero {
namespace detail {
Expand Down Expand Up @@ -75,14 +76,22 @@ inline void byteswap_inplace(int64_t* ptr) noexcept {

/// byteswap the data pointed to by ptr in-place.
inline void byteswap_inplace(float* ptr) noexcept {
auto* bptr = reinterpret_cast<uint32_t*>(ptr);
*bptr = detail::byteswap_impl(*bptr);
static_assert(sizeof(float) == 4, "Expecting four byte float");

uint32_t tmp = 0;
std::memcpy(&tmp, ptr, 4);
tmp = detail::byteswap_impl(tmp); // uint32 overload
std::memcpy(ptr, &tmp, 4);
}

/// byteswap the data pointed to by ptr in-place.
inline void byteswap_inplace(double* ptr) noexcept {
auto* bptr = reinterpret_cast<uint64_t*>(ptr);
*bptr = detail::byteswap_impl(*bptr);
static_assert(sizeof(double) == 8, "Expecting eight byte double");

uint64_t tmp = 0;
std::memcpy(&tmp, ptr, 8);
tmp = detail::byteswap_impl(tmp); // uint64 overload
std::memcpy(ptr, &tmp, 8);
}

namespace detail {
Expand Down
4 changes: 2 additions & 2 deletions contrib/protozero/include/protozero/version.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ documentation.
#define PROTOZERO_VERSION_MINOR 7

/// The patch number
#define PROTOZERO_VERSION_PATCH 0
#define PROTOZERO_VERSION_PATCH 1

/// The complete version number
#define PROTOZERO_VERSION_CODE (PROTOZERO_VERSION_MAJOR * 10000 + PROTOZERO_VERSION_MINOR * 100 + PROTOZERO_VERSION_PATCH)

/// Version number as string
#define PROTOZERO_VERSION_STRING "1.7.0"
#define PROTOZERO_VERSION_STRING "1.7.1"

#endif // PROTOZERO_VERSION_HPP