Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert to std::array and std::string. (libmythtv/recorders)
- Loading branch information
1 parent
15d7643
commit 818eced
Showing
22 changed files
with
260 additions
and
250 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
818eced
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This commit does cause conditional access to fail with this message:
2020-09-11 16:14:01.764336 E ERROR: CAM: Data pointer null
Restoring dvbcam.cpp, dvbcam.h, dvbci.cpp and dvbci.h to the state before this commit does restore correct behavior in current master.
818eced
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another issue is that the "htonl" macro is replaced by little-endian only encoding. Is this needed for c++17 compliance, is it suggested by clang-tidy or is the goal to remove big-endian support from mythtv?
818eced
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it work if you change the test on dvbci.cpp:831 from "if (!Data)" to "if (Length > 0 && !Data)"?
818eced
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new code should work for either big or little endian devices, converting them to network encoding. Arithmetic operations are endian agnostic.
The htonl macro can't be used in a uint8_t constructor because it returns a 32-bit value. The code could be modified to resize the vector by four and then use the previous "*(int *)p = htonl(ResourceId)" line, but then you end up writing the bytes twice, once with zeros and then once with the parts of ResourceId.
No, no, and of course not.
818eced
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My recommendation is to revert the changes in dvbci.cpp, dvbci.h, dvbcam.cpp and dvbcam.h. As I understand it the new code does not fix any outstanding problem and the old code works fine so there is no urgent need to rewrite it. Also, the way I understand the MythTV Coding Standards, it is recommended to "Make large style changes in a separate patch from functional changes" and your changes to the CI handler look like a functional change to me.