Codechange: use std::popcount instead of hand written loop
This commit is contained in:
@@ -126,7 +126,7 @@
|
||||
std::string text = question->GetEncodedText();
|
||||
EnforcePreconditionEncodedText(false, text);
|
||||
uint min_buttons = (type == QT_QUESTION ? 1 : 0);
|
||||
EnforcePrecondition(false, CountBits(buttons) >= min_buttons && CountBits(buttons) <= 3);
|
||||
EnforcePrecondition(false, CountBits<uint64_t>(buttons) >= min_buttons && CountBits<uint64_t>(buttons) <= 3);
|
||||
EnforcePrecondition(false, buttons >= 0 && buttons < (1 << ::GOAL_QUESTION_BUTTON_COUNT));
|
||||
EnforcePrecondition(false, (int)type < ::GQT_END);
|
||||
EnforcePrecondition(false, uniqueid >= 0 && uniqueid <= UINT16_MAX);
|
||||
|
Reference in New Issue
Block a user