launchdarkly / cpp-sdks

C++ Client/Server SDKs
Other
5 stars 2 forks source link

refactor: ensure LDLogLevel is at least 32 bits wide #415

Closed cwaldren-ld closed 1 month ago

cwaldren-ld commented 1 month ago

C++ compilers (specifically clang) complain that static_cast<LDLogLevel>(some_value_outside_range_of_defined_enum_values) is UB. To fix this, add a value to the enum forcing the valid range to be 32 bits.