Преглед изворни кода

Restore implicit conversion

Ivan Savenko пре 1 година
родитељ
комит
f1032063bc
1 измењених фајлова са 5 додато и 0 уклоњено
  1. 5 0
      lib/constants/IdentifierBase.h

+ 5 - 0
lib/constants/IdentifierBase.h

@@ -52,6 +52,11 @@ public:
 		num += change;
 	}
 
+	constexpr operator int32_t () const
+	{
+		return num;
+	}
+
 	friend std::ostream& operator<<(std::ostream& os, const IdentifierBase& dt)
 	{
 		return os << dt.num;