Skip to content

Commit

Permalink
ParmParse queryAddWithParser No Const (#4285)
Browse files Browse the repository at this point in the history
## Summary

`ParmParse::queryAddWithParser` might manipulate the internal state and
should not be a const method.

These parser functions might need a unit test in AMReX?

## Additional background

First seen in ECP-WarpX/impactx#743

## Checklist

The proposed changes:
- [x] fix a bug or incorrect behavior in AMReX
- [ ] add new capabilities to AMReX
- [ ] changes answers in the test suite to more than roundoff level
- [ ] are likely to significantly affect the results of downstream AMReX
users
- [ ] include documentation in the code and/or rst files, if appropriate
  • Loading branch information
ax3l authored Jan 7, 2025
1 parent 82ff6e7 commit d7cc380
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Src/Base/AMReX_ParmParse.H
Original file line number Diff line number Diff line change
Expand Up @@ -1117,7 +1117,7 @@ public:
std::is_same_v<T,long long> ||
std::is_same_v<T,float> ||
std::is_same_v<T,double>,int> = 0>
int queryAddWithParser (const char* name, T& ref) const
int queryAddWithParser (const char* name, T& ref)
{
int exist = this->queryWithParser(name, ref);
if (!exist) {
Expand Down

0 comments on commit d7cc380

Please sign in to comment.