Merge branch 'master' into jgrpp

# Conflicts:
#	src/genworld_gui.cpp
#	src/group_gui.cpp
#	src/saveload/saveload.cpp
#	src/settings_gui.cpp
#	src/toolbar_gui.cpp
#	src/vehicle_gui.cpp
#	src/vehicle_gui_base.h
#	src/widgets/dropdown.cpp
#	src/widgets/dropdown_type.h
This commit is contained in:
Jonathan G Rennison
2019-04-11 18:12:22 +01:00
53 changed files with 587 additions and 627 deletions

View File

@@ -43,7 +43,7 @@
struct PacketReader : LoadFilter {
static const size_t CHUNK = 32 * 1024; ///< 32 KiB chunks of memory.
AutoFreeSmallVector<byte *> blocks; ///< Buffer with blocks of allocated memory.
std::vector<byte *> blocks; ///< Buffer with blocks of allocated memory.
byte *buf; ///< Buffer we're going to write to/read from.
byte *bufe; ///< End of the buffer we write to/read from.
byte **block; ///< The block we're reading from/writing to.
@@ -55,6 +55,13 @@ struct PacketReader : LoadFilter {
{
}
~PacketReader() override
{
for (auto p : this->blocks) {
free(p);
}
}
/**
* Add a packet to this buffer.
* @param p The packet to add.