summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorljfa-ag <ljfa-ag@web.de>2015-09-05 13:17:56 +0200
committerljfa-ag <ljfa-ag@web.de>2015-09-05 13:17:56 +0200
commit3b7d44aa0b84f9c208d906f4d10517e36220ee80 (patch)
tree3d20d738d7b45ec34c4abd47baef17d06564e879 /include
parentfd32c7c7d05bc7e823d7e129d16193be4635b0c7 (diff)
downloadProject-Tick-3b7d44aa0b84f9c208d906f4d10517e36220ee80.tar.gz
Project-Tick-3b7d44aa0b84f9c208d906f4d10517e36220ee80.zip
Create constant for maximum list and array length
Diffstat (limited to 'include')
-rw-r--r--include/io/stream_writer.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/io/stream_writer.h b/include/io/stream_writer.h
index c771426bb3..959202e1ad 100644
--- a/include/io/stream_writer.h
+++ b/include/io/stream_writer.h
@@ -54,8 +54,10 @@ void write_tag(const std::string& key, const tag& t, std::ostream& os, endian::e
class stream_writer
{
public:
- ///Maximum length of an NBT string (65535)
+ ///Maximum length of an NBT string (16 bit unsigned)
static constexpr size_t max_string_len = UINT16_MAX;
+ ///Maximum length of an NBT list or array (32 bit signed)
+ static constexpr uint32_t max_array_len = INT32_MAX;
/**
* @param os the stream to write to