You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix C++20 deprecated-enum-enum-conversion warnings in BEncTag macros
Replace C-style casts with static_cast and cast enum values to char
before performing bitwise OR operations to eliminate C++20 warnings
about bitwise operations between different enumeration types.
Also rename macro parameters from 'class', 'form', 'code' to 'class_',
'form_', 'code_' to avoid potential conflicts with reserved keywords.
Fixes deprecated-enum-enum-conversion warnings when compiling with C++20:
- BEncTag1: Single-byte tag encoding
- BEncTag2: Two-byte tag encoding
- BEncTag3: Three-byte tag encoding
- BEncTag4: Four-byte tag encoding
- BEncTag5: Five-byte tag encoding
Tested with g++ -std=c++20 and confirmed no warnings are generated.
Co-authored-by: mouse07410 <5923577+mouse07410@users.noreply.github.com>
0 commit comments