launchdarkly / cpp-sdks

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

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

Closed cwaldren-ld closed 5 months ago

cwaldren-ld commented 5 months 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.