1
0
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:
Matias Fontanini
2012-10-08 21:14:57 -03:00
parent 1c22dab2dc
commit 73577c744a
19 changed files with 285 additions and 83 deletions

View File

@@ -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.