Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add template parameter for endinanness in Serial.hpp #110

Merged
merged 13 commits into from
Dec 1, 2023
Merged

Conversation

PatrickKa
Copy link
Contributor

Description

Also refactor Serial.hpp a bit.

Fixes #34

@PatrickKa PatrickKa force-pushed the endianness branch 2 times, most recently from 713f75b to a39e65b Compare November 23, 2023 14:47
Clang-tidy crashes now for some reason and I don't have the time or
nerve right now to fix that.

Setting CMAKE_CXX_STANDARD to 23 is not working properly. It adds the
flag -std=c++23 but GCC only supports -std=c++2b. I added an ugly hack,
because I also don't have the time or nerve right now to properly fix
this.
GCC is fine with C++23. Only clang-tidy doesn't like it.
With etl::byteswap() we no longer need C++23 so we can activate
clang-tidy again.
The endianness parameter was missing from all overloads of SerializeTo()
and DeserializeFrom() for user defined types so "nothing" compiled.
@codecov-commenter
Copy link

codecov-commenter commented Nov 23, 2023

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (8675469) 77.20% compared to head (4f899c0) 81.81%.

Files Patch % Lines
Sts1CobcSw/Serial/Serial.hpp 91.66% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #110      +/-   ##
==========================================
+ Coverage   77.20%   81.81%   +4.61%     
==========================================
  Files          16       16              
  Lines         351      451     +100     
==========================================
+ Hits          271      369      +98     
- Misses         80       82       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Also get rid of a warning.
@PatrickKa PatrickKa changed the title WIP: Add template parameter for endinanness in Serial.hpp Add template parameter for endinanness in Serial.hpp Dec 1, 2023
@PatrickKa PatrickKa marked this pull request as ready for review December 1, 2023 15:48
Sometimes the upload to codecov.io fails. Apparently this is because of
rate limits of the GitHub API. According to codecov issue #3954
(https://tinyurl.com/4enzfnpt) using an upload token should dramatically
improve the issue but it cannot fix it.
@PatrickKa PatrickKa merged commit 7a0d43a into master Dec 1, 2023
6 checks passed
@PatrickKa PatrickKa deleted the endianness branch December 1, 2023 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add template parameter for endinanness
2 participants