Jump to conversation
Unresolved conversations (0)
Nice work!

Nice work!

All of your conversations have been resolved.

Resolved conversations (10)
@sfan5 sfan5 Jul 26, 2021
(made function static and added two asserts) ```suggestion #include <cassert> #include "util/serialize.h" #include "serialization.h" #include "irrlichttypes.h" static void writeChunk(std::ostringstream &target, const std::string &chunk_str) { assert(chunk_str.size() >= 4); assert(chunk_str.size() - 4 < U32_MAX); writeU32(target, chunk_str.size() - 4); // Write length minus the identifier ```
Outdated
src/util/png.cpp
@nerzhul nerzhul Jul 26, 2021
cannot we use directly libpng for this ? it's one of our dependencies
src/util/png.cpp
sfan5
@sfan5 sfan5 Jul 25, 2021
We have `irrlichttypes.h` that does what these two lines do, better to use that
Outdated
src/util/png.cpp
@sfan5 sfan5 Jul 25, 2021
I don't know where it makes a difference but these should be created as `std::ostringstream foo(std::ios::binary);`
Outdated
src/script/lua_api/l_util.cpp
@sfan5 sfan5 Jul 25, 2021
`readParam<int>`
Outdated
src/script/lua_api/l_util.cpp
@sfan5 sfan5 Jul 25, 2021
And generally I think the implementation here can better live somewhere in `src/util/`.
Outdated
src/script/lua_api/l_util.cpp
@sfan5 sfan5 Jul 25, 2021
Just use `writeU32(file, 0x0d)`? same works for the rest
Outdated
src/script/lua_api/l_util.cpp
@sfan5 sfan5 Jul 25, 2021
unused?
Outdated
src/script/lua_api/l_util.cpp
hecktest
@sfan5 sfan5 Jul 25, 2021
Huh, why is that?
doc/lua_api.txt
sfan5 hecktest
@sfan5 sfan5 Jul 25, 2021
Code style: * no `;` * spacing around operators * `end` never on same line
builtin/game/misc.lua