squash commits (#1479)

This commit is contained in:
jadebenn
2024-02-27 01:29:51 -06:00
committed by GitHub
parent b261e63233
commit 424d54b98c
43 changed files with 132 additions and 130 deletions

View File

@@ -128,10 +128,10 @@ AMFBaseValue* AMFDeserialize::ReadAmfArray(RakNet::BitStream& inStream) {
auto arrayValue = new AMFArrayValue();
// Read size of dense array
auto sizeOfDenseArray = (ReadU29(inStream) >> 1);
const auto sizeOfDenseArray = (ReadU29(inStream) >> 1);
// Then read associative portion
while (true) {
auto key = ReadString(inStream);
const auto key = ReadString(inStream);
// No more associative values when we encounter an empty string key
if (key.size() == 0) break;
arrayValue->Insert(key, Read(inStream));

View File

@@ -23,7 +23,7 @@ private:
* @param inStream bitstream to read data from
* @return The number as an unsigned 29 bit integer
*/
uint32_t ReadU29(RakNet::BitStream& inStream);
static uint32_t ReadU29(RakNet::BitStream& inStream);
/**
* @brief Reads a string from a bitstream

View File

@@ -42,6 +42,7 @@ class AMFValue : public AMFBaseValue {
public:
AMFValue() = default;
AMFValue(const ValueType value) : m_Data{ value } {}
virtual ~AMFValue() override = default;
[[nodiscard]] constexpr eAmf GetValueType() const noexcept override;