We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5a7fba3 commit 4ced59eCopy full SHA for 4ced59e
Common/Utils/include/CommonUtils/EnumFlags.h
@@ -398,11 +398,14 @@ class EnumFlags
398
// Sets flags from a string representation.
399
// This can be either from a number representation (binary or digits) or
400
// a concatenation of the enums members name e.g., 'Enum1|Enum2|...'
401
- void set(const std::string& s, int base = 2)
+ void set(const std::string& s="", int base = 2)
402
{
403
// on throw restore previous state and rethrow
404
const U prev = mBits;
405
reset();
406
+ if (s.empty()) { // no-op
407
+ return;
408
+ }
409
try {
410
setImpl(s, base);
411
} catch (const std::exception& e) {
0 commit comments