mirror of
https://github.com/mfontanini/libtins
synced 2026-01-23 02:35:57 +01:00
Every test now pass on big endian architectures. Ported about half of the library to windows as well.
This commit is contained in:
11
include/ip.h
11
include/ip.h
@@ -114,7 +114,12 @@ namespace Tins {
|
||||
*
|
||||
* Initializes every field to 0.
|
||||
*/
|
||||
option_identifier() : number(0), op_class(0), copied(0) {}
|
||||
option_identifier()
|
||||
#if TINS_IS_LITTLE_ENDIAN
|
||||
: number(0), op_class(0), copied(0) {}
|
||||
#else
|
||||
: copied(0), op_class(0), number(0) {}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \brief Constructs this option from a single uint8_t value.
|
||||
@@ -144,7 +149,11 @@ namespace Tins {
|
||||
*/
|
||||
option_identifier(OptionNumber number, OptionClass op_class,
|
||||
small_uint<1> copied)
|
||||
#if TINS_IS_LITTLE_ENDIAN
|
||||
: number(number), op_class(op_class), copied(copied) {}
|
||||
#else
|
||||
: copied(copied), op_class(op_class), number(number) {}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \brief Equality operator.
|
||||
|
||||
Reference in New Issue
Block a user