mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-21 03:26:01 +00:00
Assert on type size invariant
This commit is contained in:
@@ -2,6 +2,8 @@
|
|||||||
BEAST TODO
|
BEAST TODO
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
- Rename HeapBlock routines to not conflict with _CRTDBG_MAP_ALLOC macros
|
||||||
|
|
||||||
- Design a WeakPtr / SharedPtr / SharedObject intrusive system
|
- Design a WeakPtr / SharedPtr / SharedObject intrusive system
|
||||||
|
|
||||||
- Implement beast::Bimap?
|
- Implement beast::Bimap?
|
||||||
|
|||||||
@@ -76,10 +76,10 @@ public:
|
|||||||
template <class IntegerType>
|
template <class IntegerType>
|
||||||
UnsignedInteger <Bytes>& operator= (IntegerType value)
|
UnsignedInteger <Bytes>& operator= (IntegerType value)
|
||||||
{
|
{
|
||||||
static_bassert (sizeof (Bytes) >= sizeof (IntegerType));
|
static_bassert (Bytes >= sizeof (IntegerType));
|
||||||
clear ();
|
clear ();
|
||||||
value = ByteOrder::swapIfLittleEndian (value);
|
value = ByteOrder::swapIfLittleEndian (value);
|
||||||
memcpy (end () - sizeof (value), &value, sizeof (value));
|
memcpy (end () - sizeof (value), &value, bmin (Bytes, sizeof (value)));
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user