Skip to content

Conversation

@jamesarich
Copy link
Collaborator

This commit moves the byteArrayOfInts and xorHash utility functions from core:model to a new, more appropriate core:common module.

This refactoring improves modularity by placing common byte manipulation utilities in a shared location, making them reusable across different parts of the application. The core:model module now depends on core:common to access these functions.

@jamesarich jamesarich added enhancement New feature or request refactor no functional changes and removed enhancement New feature or request labels Dec 12, 2025
This commit moves the `byteArrayOfInts` and `xorHash` utility functions from `core:model` to a new, more appropriate `core:common` module.

This refactoring improves modularity by placing common byte manipulation utilities in a shared location, making them reusable across different parts of the application. The `core:model` module now depends on `core:common` to access these functions.

Signed-off-by: James Rich <[email protected]>
Replaced the magic number `0xff` with a named constant `BYTE_MASK` to improve code readability and maintainability within the `xorHash` function.

Signed-off-by: James Rich <[email protected]>
@github-actions github-actions bot added the enhancement New feature or request label Dec 12, 2025
@codecov
Copy link

codecov bot commented Dec 12, 2025

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 0.52%. Comparing base (22513e4) to head (7f8c6ed).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
...ain/kotlin/org/meshtastic/core/common/ByteUtils.kt 0.00% 2 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff          @@
##            main   #3977   +/-   ##
=====================================
  Coverage   0.52%   0.52%           
=====================================
  Files        394     395    +1     
  Lines      23172   23172           
  Branches    2944    2944           
=====================================
  Hits         122     122           
  Misses     23029   23029           
  Partials      21      21           

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

@jamesarich jamesarich added this pull request to the merge queue Dec 12, 2025
Merged via the queue into main with commit f322660 Dec 12, 2025
6 checks passed
@jamesarich jamesarich deleted the feat/byte-utils branch December 12, 2025 15:02
@jamesarich jamesarich removed the enhancement New feature or request label Dec 13, 2025
@jamesarich jamesarich added this to the 2.7.10 milestone Dec 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor no functional changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant