summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorljfa-ag <ljfa-ag@web.de>2015-08-04 17:58:14 +0200
committerljfa-ag <ljfa-ag@web.de>2015-08-04 17:58:14 +0200
commit61b2560a524ad7fe7d5e34cfccd70a7e92e7b8b9 (patch)
treedb428cdef2aff070e8ace938f5f5264b4fd1d211 /include
parent99f15267e1f6db299d87bfb9744dec11c40963e4 (diff)
downloadProject-Tick-61b2560a524ad7fe7d5e34cfccd70a7e92e7b8b9.tar.gz
Project-Tick-61b2560a524ad7fe7d5e34cfccd70a7e92e7b8b9.zip
Create is_valid_type function
Diffstat (limited to 'include')
-rw-r--r--include/tag.h6
1 files changed, 6 insertions, 0 deletions
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
{