Skip to content

Commit

Permalink
Fix compilation errors in clang 17
Browse files Browse the repository at this point in the history
  • Loading branch information
Destroyerrrocket authored and fraillt committed Jul 21, 2024
1 parent 94f7ada commit cd73aca
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/bitsery/adapter/buffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#ifndef BITSERY_ADAPTER_BUFFER_H
#define BITSERY_ADAPTER_BUFFER_H

#include "../bitsery.h"
#include "../details/adapter_bit_packing.h"
#include "../traits/core/traits.h"
#include <algorithm>
Expand Down Expand Up @@ -276,7 +277,7 @@ class OutputBufferAdapter
}
}

void maybeResize(size_t newOffset, std::false_type)
void maybeResize(BITSERY_MAYBE_UNUSED size_t newOffset, std::false_type)
{
assert(newOffset <= _bufferSize);
}
Expand Down
6 changes: 6 additions & 0 deletions include/bitsery/bitsery.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@
BITSERY_BUILD_VERSION_STR( \
BITSERY_MAJOR_VERSION, BITSERY_MINOR_VERSION, BITSERY_PATCH_VERSION)

#if __cplusplus > 201402L
#define BITSERY_MAYBE_UNUSED [[maybe_unused]]
#else
#define BITSERY_MAYBE_UNUSED
#endif

#include "deserializer.h"
#include "serializer.h"

Expand Down
1 change: 1 addition & 0 deletions include/bitsery/ext/growable.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#define BITSERY_EXT_GROWABLE_H

#include "../traits/core/traits.h"
#include <cstdint>

namespace bitsery {

Expand Down
1 change: 1 addition & 0 deletions include/bitsery/ext/std_bitset.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

#include "../traits/core/traits.h"
#include <bitset>
#include <cstdint>

namespace bitsery {
namespace ext {
Expand Down

0 comments on commit cd73aca

Please sign in to comment.