support for scoped enums and operators in Python

This commit is contained in:
Erik Frojdh
2021-07-16 14:48:22 +02:00
parent 1b348f9b3a
commit 09391b767a
9 changed files with 138 additions and 21 deletions

View File

@ -526,9 +526,9 @@ std::string ToString(const defs::EthernetInterface s) {
case defs::EthernetInterface::NONE:
return std::string("none");
default:
if (s & defs::EthernetInterface::I3GBE)
if ((s & defs::EthernetInterface::I3GBE)!=defs::EthernetInterface::NONE)
os << "3gbe, ";
if (s & defs::EthernetInterface::I10GBE)
if ((s & defs::EthernetInterface::I10GBE)!=defs::EthernetInterface::NONE)
os << "10gbe, ";
auto rs = os.str();
rs.erase(rs.end() - 2, rs.end());