| Index: mojo/edk/system/ports/name.h
|
| diff --git a/mojo/edk/system/ports/name.h b/mojo/edk/system/ports/name.h
|
| index 1082719f6df5f29c37d3a6bb6df00fc8a78514fd..2e74cd58e534eb1e21bce9cc5399142d91aa5ced 100644
|
| --- a/mojo/edk/system/ports/name.h
|
| +++ b/mojo/edk/system/ports/name.h
|
| @@ -17,7 +17,7 @@ namespace edk {
|
| namespace ports {
|
|
|
| struct Name {
|
| - Name(uint64_t v1, uint64_t v2) : v1(v1), v2(v2) {}
|
| + constexpr Name(uint64_t v1, uint64_t v2) : v1(v1), v2(v2) {}
|
| uint64_t v1, v2;
|
| };
|
|
|
| @@ -36,18 +36,19 @@ inline bool operator<(const Name& a, const Name& b) {
|
| std::ostream& operator<<(std::ostream& stream, const Name& name);
|
|
|
| struct PortName : Name {
|
| - PortName() : Name(0, 0) {}
|
| - PortName(uint64_t v1, uint64_t v2) : Name(v1, v2) {}
|
| + constexpr PortName() : Name(0, 0) {}
|
| + constexpr PortName(uint64_t v1, uint64_t v2) : Name(v1, v2) {}
|
| };
|
|
|
| -const PortName kInvalidPortName = {0, 0};
|
| -
|
| struct NodeName : Name {
|
| - NodeName() : Name(0, 0) {}
|
| - NodeName(uint64_t v1, uint64_t v2) : Name(v1, v2) {}
|
| + constexpr NodeName() : Name(0, 0) {}
|
| + constexpr NodeName(uint64_t v1, uint64_t v2) : Name(v1, v2) {}
|
| };
|
|
|
| -const NodeName kInvalidNodeName = {0, 0};
|
| +struct constants {
|
| + static constexpr PortName kInvalidPortName = {0, 0};
|
| + static constexpr NodeName kInvalidNodeName = {0, 0};
|
| +};
|
|
|
| } // namespace ports
|
| } // namespace edk
|
|
|