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

Optimize code width calculation in Code39Writer #1103

Merged
merged 1 commit into from Nov 4, 2018

Conversation

Projects
None yet
3 participants
@makiuchi-d
Contributor

makiuchi-d commented Nov 4, 2018

Every code39 character has 9 bars containing 3 wide bars, and separated by a white bar.
(9-3)*1 + 3*2 + 1 = 13

Optimize code width calculation in Code39Writer
Every code39 character has 9 bars containing 3 wide bars, and separated by a white bar.
(9-3)*1 + 3*2 + 1 = 13
@codecov-io

This comment has been minimized.

codecov-io commented Nov 4, 2018

Codecov Report

Merging #1103 into master will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1103      +/-   ##
============================================
- Coverage      77.7%   77.69%   -0.01%     
+ Complexity     4269     4267       -2     
============================================
  Files           252      252              
  Lines         14045    14040       -5     
  Branches       2871     2869       -2     
============================================
- Hits          10914    10909       -5     
  Misses         2302     2302              
  Partials        829      829
Impacted Files Coverage Δ Complexity Δ
.../main/java/com/google/zxing/oned/Code39Writer.java 89.04% <100%> (-0.71%) 25 <0> (-2)

Continue to review full report at Codecov.

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

@srowen

This comment has been minimized.

Contributor

srowen commented Nov 4, 2018

Yes, looks good.

@srowen srowen merged commit b31e090 into zxing:master Nov 4, 2018

4 checks passed

Codacy/PR Quality Review Up to standards. A positive pull request.
Details
codecov/patch 100% of diff hit (target 77.7%)
Details
codecov/project Absolute coverage decreased by -<.01% but relative coverage increased by +22.29% compared to 58feb44
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@makiuchi-d makiuchi-d deleted the makiuchi-d:code39writer-codewidth-calculation branch Nov 5, 2018

@srowen srowen added the enhancement label Nov 9, 2018

@srowen srowen added this to the 3.3.4 milestone Nov 9, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment