From 61b2560a524ad7fe7d5e34cfccd70a7e92e7b8b9 Mon Sep 17 00:00:00 2001 From: ljfa-ag Date: Tue, 4 Aug 2015 17:58:14 +0200 Subject: Create is_valid_type function --- include/tag.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include') diff --git a/include/tag.h b/include/tag.h index 75a41f2e1f..ae84891c76 100644 --- a/include/tag.h +++ b/include/tag.h @@ -45,6 +45,12 @@ enum class tag_type : int8_t Null = -1 ///< Used to denote empty @ref value s }; +/** + * @brief Returns whether the given number falls within the range of valid tag types + * @param allow_end whether to consider tag_type::End (0) valid + */ +bool is_valid_type(int type, bool allow_end = false); + ///Base class for all NBT tag classes class tag { -- cgit 0.0.5-2-1-g0f52