Skip to content

Commit

Permalink
Address review comment.
Browse files Browse the repository at this point in the history
  • Loading branch information
bzbarsky-apple committed Jul 26, 2022
1 parent cd6deef commit f84e2d4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/lib/support/SetupDiscriminator.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,6 @@ class SetupDiscriminator
}

private:
static_assert(kLongBits == 12, "Unexpected field length");

static constexpr uint16_t kLongMask = (1 << kLongBits) - 1;
static constexpr uint8_t kShortMask = (1 << kShortBits) - 1;

Expand All @@ -101,9 +99,11 @@ class SetupDiscriminator
}

// If long discriminator, all 12 bits are used. If short discriminator,
// only the low kManualSetupDiscriminatorFieldLengthInBits bits are used, to
// store the value of the short discriminator (which contains only the high
// bits of the complete 12-bit discriminator).
// only the low kShortBits bits are used, to store the value of the short
// discriminator (which contains only the high bits of the complete 12-bit
// discriminator).
static_assert(kLongBits == 12, "Unexpected field length");
static_assert(kShortBits <= kLongBits, "Unexpected field length");
uint16_t mDiscriminator : 12;
uint16_t mIsShortDiscriminator : 1;
};
Expand Down

0 comments on commit f84e2d4

Please sign in to comment.