mirror of
https://github.com/fraillt/bitsery.git
synced 2026-08-14 15:19:48 +00:00
Merge branch 'master' of https://github.com/fraillt/bitsery
This commit is contained in:
@@ -27,7 +27,7 @@ struct Color {
|
||||
float r{}, g{}, b{};
|
||||
bool operator == (const Color& o) const {
|
||||
return std::tie(r, g, b) ==
|
||||
std::tie(o.r, o.g, b);
|
||||
std::tie(o.r, o.g, o.b);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
@@ -240,7 +240,7 @@ namespace bitsery {
|
||||
auto bitsLeft = size;
|
||||
T res{};
|
||||
while (bitsLeft > 0) {
|
||||
auto bits = std::min(bitsLeft, details::BitsSize<UnsignedValue>::value);
|
||||
auto bits = (std::min)(bitsLeft, details::BitsSize<UnsignedValue>::value);
|
||||
if (m_scratchBits < bits) {
|
||||
UnsignedValue tmp;
|
||||
_reader.template readBytes<sizeof(UnsignedValue), UnsignedValue>(tmp);
|
||||
|
||||
@@ -295,7 +295,7 @@ namespace bitsery {
|
||||
auto value = v;
|
||||
auto bitsLeft = size;
|
||||
while (bitsLeft > 0) {
|
||||
auto bits = std::min(bitsLeft, valueSize);
|
||||
auto bits = (std::min)(bitsLeft, valueSize);
|
||||
_scratch |= static_cast<ScratchType>( value ) << _scratchBits;
|
||||
_scratchBits += bits;
|
||||
if (_scratchBits >= valueSize) {
|
||||
@@ -324,7 +324,7 @@ namespace bitsery {
|
||||
}
|
||||
}
|
||||
|
||||
const UnsignedType _MASK = std::numeric_limits<UnsignedType>::max();
|
||||
const UnsignedType _MASK = (std::numeric_limits<UnsignedType>::max)();
|
||||
ScratchType _scratch{};
|
||||
size_t _scratchBits{};
|
||||
TWriter& _writer;
|
||||
|
||||
@@ -73,7 +73,7 @@ namespace bitsery {
|
||||
auto newSize = static_cast<size_t>(container.size() * 1.5 + 128);
|
||||
//make data cache friendly
|
||||
newSize -= newSize % 64;//64 is cache line size
|
||||
container.resize(std::max(newSize, container.capacity()));
|
||||
container.resize((std::max)(newSize, container.capacity()));
|
||||
}
|
||||
using TIterator = typename T::iterator;
|
||||
using TValue = typename ContainerTraits<T>::TValue;
|
||||
|
||||
Reference in New Issue
Block a user