소스 검색

Add 'hasFeature' method for convenience

Ivan Savenko 1 년 전
부모
커밋
5b182c31df
2개의 변경된 파일10개의 추가작업 그리고 0개의 파일을 삭제
  1. 5 0
      lib/serializer/BinaryDeserializer.h
  2. 5 0
      lib/serializer/BinarySerializer.h

+ 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>