diff options
author | LaG1924 <12997935+LaG1924@users.noreply.github.com> | 2017-05-31 16:17:09 +0200 |
---|---|---|
committer | LaG1924 <12997935+LaG1924@users.noreply.github.com> | 2017-05-31 16:17:09 +0200 |
commit | f721ed0e3c6be33670fe330c029a2d4c3353f635 (patch) | |
tree | 5afad5a292171d546d9ded16de6151a014883d84 /src/packet/Field.hpp | |
parent | 2017-05-28 (diff) | |
download | AltCraft-f721ed0e3c6be33670fe330c029a2d4c3353f635.tar AltCraft-f721ed0e3c6be33670fe330c029a2d4c3353f635.tar.gz AltCraft-f721ed0e3c6be33670fe330c029a2d4c3353f635.tar.bz2 AltCraft-f721ed0e3c6be33670fe330c029a2d4c3353f635.tar.lz AltCraft-f721ed0e3c6be33670fe330c029a2d4c3353f635.tar.xz AltCraft-f721ed0e3c6be33670fe330c029a2d4c3353f635.tar.zst AltCraft-f721ed0e3c6be33670fe330c029a2d4c3353f635.zip |
Diffstat (limited to 'src/packet/Field.hpp')
-rw-r--r-- | src/packet/Field.hpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/packet/Field.hpp b/src/packet/Field.hpp index 8be9c9b..c33cd1c 100644 --- a/src/packet/Field.hpp +++ b/src/packet/Field.hpp @@ -2,8 +2,10 @@ #include <cstddef> #include <cstdint> +#include <cmath> #include <string> #include <vector> + #include "../utility/utility.h" #include "../utility/Vector.hpp" @@ -11,7 +13,7 @@ typedef unsigned char byte; typedef signed char sbyte; enum FieldType { - Unknown = 0, + UnknownType = 0, Boolean, //Bool Byte8_t, //int8_t UnsignedByte, //uint8_t @@ -28,7 +30,7 @@ enum FieldType { String = 100, //std::string Chat, //std::string - VarInt, //int32_t + VarIntType, //int32_t VarLong, //int64_t ChunkSection, //byte* EntityMetadata, //byte* @@ -55,7 +57,7 @@ public: void CopyToBuff(byte *ptr); - void SetRaw(byte *ptr, size_t len = 0, FieldType type = Unknown); + void SetRaw(byte *ptr, size_t len = 0, FieldType type = UnknownType); FieldType GetType(); @@ -114,6 +116,6 @@ public: private: size_t m_dataLength = 0; byte *m_data = nullptr; - FieldType m_type = Unknown; + FieldType m_type = UnknownType; std::vector<Field> m_childs; }; |