Skip to content

Add irept::set_size_t to avoid unnecessary casts #6052

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

Merged
merged 1 commit into from
Apr 24, 2021

Conversation

tautschnig
Copy link
Collaborator

The integer-typed argument to irept::set is converted to a string, which
works equally well for types other than long long. Naming the new method
just "set" would result in ambiguous overload, thus using set_size_t
(which is also consistent with the existing get_size_t).

  • Each commit message has a non-empty body, explaining why the change was made.
  • Methods or procedures I have added are documented, following the guidelines provided in CODING_STANDARD.md.
  • n/a The feature or user visible behaviour I have added or modified has been documented in the User Guide in doc/cprover-manual/
  • Regression or unit tests are included, or existing tests cover the modified code (in this case I have detailed which ones those are in the commit message).
  • n/a My commit message includes data points confirming performance improvements (if claimed).
  • My PR is restricted to a single feature or bugfix.
  • n/a White-space or formatting changes outside the feature-related changed lines are in commits of their own.

@codecov
Copy link

codecov bot commented Apr 23, 2021

Codecov Report

Merging #6052 (ae1aac1) into develop (ff5902e) will decrease coverage by 0.44%.
The diff coverage is 89.83%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #6052      +/-   ##
===========================================
- Coverage    74.25%   73.81%   -0.45%     
===========================================
  Files         1444     1444              
  Lines       157460   157448      -12     
===========================================
- Hits        116928   116220     -708     
- Misses       40532    41228     +696     
Impacted Files Coverage Δ
src/goto-instrument/code_contracts.h 94.11% <ø> (ø)
src/solvers/flattening/boolbv.cpp 80.00% <0.00%> (+0.47%) ⬆️
src/solvers/flattening/boolbv_case.cpp 0.00% <0.00%> (ø)
src/solvers/flattening/boolbv_cond.cpp 0.00% <0.00%> (ø)
src/solvers/prop/prop.cpp 42.85% <0.00%> (-42.86%) ⬇️
src/solvers/prop/prop.h 84.37% <ø> (ø)
src/solvers/sat/cnf.h 83.33% <ø> (ø)
src/util/irep.h 93.47% <ø> (ø)
src/util/std_expr.h 92.08% <ø> (-0.56%) ⬇️
src/goto-instrument/code_contracts.cpp 84.75% <100.00%> (+0.46%) ⬆️
... and 60 more

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 4a7b064...ae1aac1. Read the comment docs.

@tautschnig tautschnig self-assigned this Apr 23, 2021
The integer-typed argument to irept::set is converted to a string, which
works equally well for types other than long long. Naming the new method
just "set" would result in ambiguous overload, thus using set_size_t
(which is also consistent with the existing get_size_t).
@tautschnig tautschnig merged commit afd8a60 into diffblue:develop Apr 24, 2021
@tautschnig tautschnig deleted the set_size_t branch April 24, 2021 20:53
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.

2 participants