Skip to content
Snippets Groups Projects
Commit b9ffea6f authored by Adam Edward Barton's avatar Adam Edward Barton
Browse files

Merge branch 'warn.L1TopoSimulationUtils-20200618' into 'master'

L1TopoSimulationUtils: Avoid gcc10 warning.

See merge request atlas/athena!33881
parents dc6aeabd fa942bf6
No related branches found
No related tags found
No related merge requests found
/*
Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
/*********************************
* L1TopoDataTypes.h
......@@ -182,8 +182,9 @@ namespace TSU {
// Get integer part
res += (m_tvalue>>F)&((1<<(PREC-F))-1) ? float((m_tvalue>>F)&((1<<(PREC-F))-1)) : 0;
// Do the fractional part
for(unsigned j=0;j<F;++j){
res += (m_tvalue & (1 << (F-1-j))) ? 1./(2<<(j)) : 0;
if (F > 0) {
unsigned frac = m_tvalue & ( (1<<F)-1 );
res += static_cast<float>(frac) / (2<<(F-1));
}
return res;
}
......
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