These are not exceptions so we don’t need multiple variants of
generic error in case someone wants to catch it somewhere
up the call stack.
It’s okay to use UNKNOWN for generic errors where we don’t know
exactly what happened.
This concludes the implementation of the in-memory NBT representation.
This is still all untested code so it might just blow up in your face.
The next step will be writing tests (and probably a lot of cursing and
debugging)...
One for serializing full tags and one for serializing tags without
their header.
The former is what used to be `toRawData` - though a bunch of
duplicated code has been removed by just moving it to the Generic
type class instead of having an implementation on the sub-classes.
The latter is useful for serializing lists.
The previous warning that all of this is untested still applies.
This is still all unvalidated work.
For all I know it might cause your computer to burst into flames,
grow an arm and a leg and an eye, and attack you with a sword.
But probably, it will just not work and I will realize that sleepy
past me was a fucking idiot (as always).
The former is finally some progress on getting NBT going,
though at this point it is all unvalidated work.
For all I know it might cause your computer to burst into flames,
grow an arm and a leg and an eye, and attack you with a sword.
But probably, it won’t do that and instead start working after I
have debugged it so much that I wish I could attack my PC with a sword.
The latter is the implementation of a change I prepared in a previous commit
when i added ErrorOrVoid.
Doesn’t compile on Void x86_32 glibc. This will need to be investigated.
I just wanted to get rid of the errors while working on other issues.
Compile command:
ccache g++ -std=c++20 -Wall -Wextra src/tools/hexnet.cpp -I./include -Lbin/lib -l:cli.so -l:libsockpp.so -o bin/tools/hexnet
Never again will you need to manually convert binary data into an array!
This tool does it for you! Get it now for only $99! Limited availability!
To process data from stdin / a pipe, just pass `-` as the file name.