Skip to content
Snippets Groups Projects
Commit 7edb1e4b authored by Mark Jones's avatar Mark Jones Committed by Stephen A. Wood
Browse files

Modify THcFormula to properly handle kCutScaler and kCutNCalled.

This is a temporary fix for problem that arise when compiling on the
ifarm machines. In the DefinedValue method when using
kCutScaler and kCutNCalled the switch statement goes to the default
case.

On ifarm gcc version 4.4.6 20110731 (Red Hat 4.4.6-3) (GCC)
There are compiler warnings
 src/THcFormula.cxx: In member function 'virtual Double_t THcFormula::DefinedValue(Int_t)':
src/THcFormula.cxx:131: warning: case label value exceeds maximum value for type
src/THcFormula.cxx:134: warning: case label value exceeds maximum value for type
One permenant fix would be to add kCutScaler and kCutNCalled to the
enum EVariableType in THaFormula.h.
parent 1e5a7655
No related branches found
No related tags found
No related merge requests found
......@@ -121,7 +121,7 @@ Double_t THcFormula::DefinedValue( Int_t i )
FVarDef_t* def = fVarDef+i;
const void* ptr = def->code;
if( !ptr ) return kBig;
switch( def->type ) {
switch( (Int_t) def->type ) {
case kVariable:
case kString:
return reinterpret_cast<const THaVar*>(ptr)->GetValue( def->index );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment