iptux-src / iptux

A software for sharing in LAN
GNU General Public License v2.0
445 stars 130 forks source link

remove flags #619

Closed lidaobing closed 4 months ago

lidaobing commented 4 months ago

Summary by Sourcery

This pull request refactors the code by removing bitwise flag operations and replacing them with individual boolean member variables. This change improves code readability and maintainability. Corresponding tests have been updated to reflect these changes.

sourcery-ai[bot] commented 4 months ago

Reviewer's Guide by Sourcery

This pull request removes the use of bitwise flags and replaces them with individual boolean member variables. This change simplifies the code by eliminating the need for bitwise operations and makes the code more readable and maintainable.

File-Level Changes

Files Changes
src/iptux-core/ProgramData.cpp
src/iptux-core/Models.cpp
src/api/iptux-core/ProgramData.h
src/api/iptux-core/Models.h
Replaced the use of bitwise flags with individual boolean member variables and updated methods accordingly.
src/iptux-utils/utils.cpp
src/iptux-utils/UtilsTest.cpp
src/iptux-utils/utils.h
Removed FLAG_SET, FLAG_CLR functions, and related tests.
src/iptux/DataSettings.cpp
src/iptux-core/internal/UdpDataServiceTest.cpp
src/iptux/MainWindow.cpp
Updated method calls and tests to use the new boolean member variables instead of bitwise operations.

Tips - Trigger a new Sourcery review by commenting `@sourcery-ai review` on the pull request. - Continue your discussion with Sourcery by replying directly to review comments. - You can change your review settings at any time by accessing your [dashboard](https://app.sourcery.ai): - Enable or disable the Sourcery-generated pull request summary or reviewer's guide; - Change the review language; - You can always [contact us](mailto:support@sourcery.ai) if you have any questions or feedback.
codecov[bot] commented 4 months ago

Codecov Report

Attention: Patch coverage is 95.94595% with 3 lines in your changes missing coverage. Please review.

Project coverage is 51.90%. Comparing base (047e579) to head (2ef6246).

Files Patch % Lines
src/api/iptux-core/ProgramData.h 91.66% 1 Missing :warning:
src/iptux-core/Models.cpp 94.11% 1 Missing :warning:
src/iptux/MainWindow.cpp 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #619 +/- ## ========================================== + Coverage 51.85% 51.90% +0.05% ========================================== Files 64 64 Lines 8370 8375 +5 ========================================== + Hits 4340 4347 +7 + Misses 4030 4028 -2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.