Skip to content

Commit 078c883

Browse files
committed
Simplify CSCCFEBStatusDigi::ShiftSel
This also fixes a static analysis warning.
1 parent da4ed04 commit 078c883

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

DataFormats/CSCDigi/src/CSCCFEBStatusDigi.cc

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,7 @@
99
#include <cstdint>
1010

1111
/// Shift and select
12-
int CSCCFEBStatusDigi::ShiftSel(int nmb, int nshift, int nsel) const {
13-
int tmp = nmb;
14-
tmp = tmp >> nshift;
15-
return tmp = tmp & nsel;
16-
}
12+
int CSCCFEBStatusDigi::ShiftSel(int nmb, int nshift, int nsel) const { return (nmb >> nshift) & nsel; }
1713
/// Get SCA Full Condition
1814
std::vector<uint16_t> CSCCFEBStatusDigi::getSCAFullCond() const {
1915
/* std::vector<int> vec(4,0);

0 commit comments

Comments
 (0)