diff options
author | Emilio Cobos Álvarez <emilio@crisal.io> | 2017-06-18 00:57:41 +0200 |
---|---|---|
committer | Emilio Cobos Álvarez <emilio@crisal.io> | 2017-06-18 02:09:28 +0200 |
commit | 700a3ea249f1f82abe7ed4be98359aff615d13e1 (patch) | |
tree | b678320e07aa6dede425507b4e76226afa532ee6 /bindgen-integration/cpp/Test.cc | |
parent | 02ac99221a4d418c1d7dd3eef1fcda160f3696b1 (diff) |
codegen: Fix bitfield getter/setters so they work with NPOT sizes.
Diffstat (limited to 'bindgen-integration/cpp/Test.cc')
-rw-r--r-- | bindgen-integration/cpp/Test.cc | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/bindgen-integration/cpp/Test.cc b/bindgen-integration/cpp/Test.cc index 9d91250c..f125109a 100644 --- a/bindgen-integration/cpp/Test.cc +++ b/bindgen-integration/cpp/Test.cc @@ -76,4 +76,29 @@ Date2::assert(unsigned short nWeekDay, this->byte == byte; } +bool +Fifth::assert(unsigned short nWeekDay, + unsigned short nMonthDay, + unsigned short nMonth, + unsigned short nYear, + unsigned char byte) +{ + return this->nWeekDay == nWeekDay && + this->nMonthDay == nMonthDay && + this->nMonth == nMonth && + this->nYear == nYear && + this->byte == byte; +} + +bool +Sixth::assert(unsigned char byte, + unsigned char nWeekDay, + unsigned char nMonth, + unsigned char nMonthDay) { + return this->nWeekDay == nWeekDay && + this->nMonthDay == nMonthDay && + this->nMonth == nMonth && + this->byte == byte; +}; + } // namespace bitfields |