mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-07-14 11:40:49 +02:00
added slsWarnings and c++17 compiler option
This commit is contained in:
@@ -35,7 +35,7 @@ template <typename T>
|
||||
void setRegisterField(uint32_t ®istervalue, const RegisterField ®_field,
|
||||
T field_value) {
|
||||
|
||||
if (field_value > reg_field.bitmask) {
|
||||
if (field_value > static_cast<T>(reg_field.bitmask)) {
|
||||
throw std::invalid_argument(
|
||||
fmt::format("Value {} cannot fit in field with bitmask {}",
|
||||
field_value, reg_field.bitmask));
|
||||
|
||||
Reference in New Issue
Block a user