Default initialize enum flags to 0
... so that we don't need to do it manually, and potentially forget. For example, this allows to do: my_flags flags; ... flags |= some_flag; gdb/ChangeLog: * common/enum-flags.h (enum_flags::enum_flags): Initialize m_enum_value to 0 in default constructor.
This commit is contained in:
parent
2039d74e78
commit
1b90b13906
|
@ -1,3 +1,8 @@
|
|||
2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
|
||||
|
||||
* common/enum-flags.h (enum_flags::enum_flags): Initialize
|
||||
m_enum_value to 0 in default constructor.
|
||||
|
||||
2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
|
||||
|
||||
* rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
|
||||
|
|
|
@ -115,8 +115,9 @@ private:
|
|||
}
|
||||
|
||||
public:
|
||||
/* Allow default construction, just like raw enums. */
|
||||
/* Allow default construction. */
|
||||
enum_flags ()
|
||||
: m_enum_value ((enum_type) 0)
|
||||
{}
|
||||
|
||||
enum_flags (const enum_flags &other)
|
||||
|
|
Loading…
Reference in New Issue