Change from int to StarMagField::EBField type #605
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves a run-time error seen in tests of compiling software for ROOT 6.16.00. I also tested this fix in ROOT 5.34.38 to be sure it doesn't break it.
-Gene
...
QA :INFO - ProcessLine if (!StarMagField::Instance()) new StarMagField( 2, 1.000000, kTRUE);
input_line_668:2:37: error: no matching constructor for initialization of 'StarMagField'
if (!StarMagField::Instance()) new StarMagField( 2, 1.000000, kTRUE);
^ ~~~~~~~~~~~~~~~~~~
/afs/rhic.bnl.gov/star/packages/SL23x/.sl73_x8664_gcc485/include/StarMagField.h:155:3: note: candidate constructor not viable: no known conversion from 'int' to 'StarMagField::EBField' for 1st argument
StarMagField ( EBField map = kMapped, Float_t Factor = 1,
^
/afs/rhic.bnl.gov/star/packages/SL23x/.sl73_x8664_gcc485/include/StarMagField.h:91:7: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 3 were provided
class StarMagField : public TVirtualMagField
^
BFC:ERROR - StBFChain::ProcessLine command:if (!StarMagField::Instance()) new StarMagField( 2, 1.000000, kTRUE); has failed. Quit job.