Skip to content

Commit

Permalink
Restyled by clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
restyled-commits committed Oct 25, 2021
1 parent 4915543 commit 96c9e24
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/transport/raw/MessageHeader.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,9 @@ enum class SecFlagValues : uint8_t
kMsgExtensionFlag = 0b00100000,
};

enum SecFlagMask {
kSessionTypeMask = 0b00000011, ///< Mask to extract sessionType
enum SecFlagMask
{
kSessionTypeMask = 0b00000011, ///< Mask to extract sessionType
};

using MsgFlags = BitFlags<MsgFlagValues>;
Expand Down Expand Up @@ -168,7 +169,8 @@ class PacketHeader

void SetMessageFlags(uint8_t flags) { mMsgFlags.SetRaw(flags); }

void SetSecurityFlags(uint8_t securityFlags) {
void SetSecurityFlags(uint8_t securityFlags)
{
mSecFlags.SetRaw(securityFlags);
mSessionType = static_cast<Header::SessionType>(securityFlags & Header::SecFlagMask::kSessionTypeMask);
}
Expand Down

0 comments on commit 96c9e24

Please sign in to comment.