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

Refactor for speed and consistency #252

Merged
merged 10 commits into from
Jan 11, 2025
Merged

Refactor for speed and consistency #252

merged 10 commits into from
Jan 11, 2025

Conversation

Flamefire
Copy link
Collaborator

  1. Consistently pass string_view by value as is best practice with it being a pointer-size pair
  2. Move try_to_int to new header moving it out of a header containing the large base_num_format.
  3. Use Boost.Charconv in try_to_int
  4. Allow try_to_int to be used with other integer types, e.g. the unsigned as used with in one other place
  5. Avoid superflous copies of the time zone string: First into a local variable, then into a vector to have it non-const. The latter is only required for FreeBSD and apple, not for all Linux systems.
  6. Test only: Return the success state in TEST macro to allow depending on the return value for further tests

Copy link

codecov bot commented Jan 2, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.87%. Comparing base (5a58e65) to head (e540a63).
Report is 11 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##           develop     #252   +/-   ##
========================================
  Coverage    95.87%   95.87%           
========================================
  Files          117      119    +2     
  Lines        10406    10410    +4     
========================================
+ Hits          9977     9981    +4     
  Misses         429      429           
Files with missing lines Coverage Δ
include/boost/locale/boundary/boundary_point.hpp 100.00% <ø> (ø)
include/boost/locale/boundary/index.hpp 98.77% <ø> (ø)
include/boost/locale/boundary/segment.hpp 100.00% <ø> (ø)
include/boost/locale/detail/any_string.hpp 100.00% <100.00%> (ø)
include/boost/locale/detail/encoding.hpp 100.00% <100.00%> (ø)
include/boost/locale/encoding.hpp 100.00% <100.00%> (ø)
include/boost/locale/format.hpp 97.82% <ø> (ø)
include/boost/locale/formatting.hpp 100.00% <ø> (ø)
include/boost/locale/message.hpp 100.00% <ø> (ø)
src/encoding/codepage.cpp 100.00% <ø> (ø)
... and 26 more

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5a58e65...e540a63. Read the comment docs.

@Flamefire Flamefire force-pushed the refactor branch 5 times, most recently from 0de23c0 to 9f07faa Compare January 6, 2025 08:42
@Flamefire Flamefire merged commit 6c890c1 into develop Jan 11, 2025
54 checks passed
@Flamefire Flamefire deleted the refactor branch January 12, 2025 16: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.

1 participant