Skip to content

Commit

Permalink
Packet: remove _defaultReserveSize static variable
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathSpirit committed Jan 28, 2025
1 parent c60956f commit 2b96fa2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 0 additions & 2 deletions includes/FastEngine/network/C_packet.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,6 @@ class FGE_API Packet
bool operator==(Packet const& right) const = delete;
bool operator!=(Packet const& right) const = delete;

static std::size_t _defaultReserveSize;

[[nodiscard]] virtual bool onSend(std::size_t offset);
virtual void onReceive(std::span<uint8_t const> const& data);

Expand Down
4 changes: 1 addition & 3 deletions sources/network/C_packet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Packet::Packet() :
g_readPos(0),
g_valid(true)
{
this->g_data.reserve(_defaultReserveSize);
this->g_data.reserve(FGE_PACKET_DEFAULT_RESERVESIZE);
}

Packet::Packet(Packet&& pck) noexcept :
Expand Down Expand Up @@ -587,6 +587,4 @@ void Packet::onReceive(std::span<uint8_t const> const& data)
this->append(data.data(), data.size());
}

std::size_t Packet::_defaultReserveSize = FGE_PACKET_DEFAULT_RESERVESIZE;

} // namespace fge::net

0 comments on commit 2b96fa2

Please sign in to comment.