This can be the else case of the above. Or maybe switch cases (not XX might be harder to read):
``` c++
if (submodesAllowedMask) {
if ((childIter->second.submode | mask) != mask) {
return returnvalue::FAILED;
}
}else{
if (childIter->second.submode != submodeToCheckAgainst) {
return returnvalue::FAILED;
}
}
return returnvalue::OK;
```
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
See comments
@@ -24,2 +24,4 @@using namespace mode;std::map<object_id_t, ChildInfo>::iterator childIter;auto checkSubmode = [&]() {If you have to use a lambda, which I find a nightmare to read, maybe capture &childIter explicitly.
@@ -26,0 +36,4 @@return returnvalue::FAILED;}}if (submodesAllowedMask) {This can be the else case of the above. Or maybe switch cases (not XX might be harder to read):
@@ -109,0 +101,4 @@/*** Specialization of @enableSubmodeAllowed which allows all submodes.*/void allowAllSubmodes() { enableSubmodeAllowed(0xff); }0xFF should be defined somewhere visible as a restricted mask.
LGTM