mirror of
https://github.com/mfontanini/libtins
synced 2026-01-29 13:04:28 +01:00
assert() is only called when TINS_DEBUG is defined.
This commit is contained in:
@@ -27,7 +27,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef TINS_DEBUG
|
||||
#include <cassert>
|
||||
#endif
|
||||
#include <algorithm>
|
||||
#include "rawpdu.h"
|
||||
|
||||
@@ -49,7 +51,9 @@ uint32_t RawPDU::header_size() const {
|
||||
}
|
||||
|
||||
void RawPDU::write_serialization(uint8_t *buffer, uint32_t total_sz, const PDU *) {
|
||||
#ifdef TINS_DEBUG
|
||||
assert(total_sz >= _payload.size());
|
||||
#endif
|
||||
std::copy(_payload.begin(), _payload.end(), buffer);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user