Przeglądaj źródła

Add 'hasFeature' method for convenience

Ivan Savenko 1 rok temu
rodzic
commit
5b182c31df

+ 5 - 0
lib/serializer/BinaryDeserializer.h

@@ -162,6 +162,11 @@ public:
 	bool smartPointerSerialization;
 	bool saving;
 
+	bool hasFeature(Version what)
+	{
+		return version >= what;
+	};
+
 	BinaryDeserializer(IBinaryReader * r);
 
 	template<class T>

+ 5 - 0
lib/serializer/BinarySerializer.h

@@ -119,6 +119,11 @@ public:
 	bool smartPointerSerialization;
 	bool saving;
 
+	bool hasFeature(Version what)
+	{
+		return version >= what;
+	};
+
 	BinarySerializer(IBinaryWriter * w);
 
 	template<typename Base, typename Derived>