Use std::string for CommandContainer text instead of giant static buffer

Use move semantics for CommandContainer instance where feasible
This commit is contained in:
Jonathan G Rennison
2018-08-13 12:16:41 +01:00
parent 957cff34dc
commit 940314a3c7
10 changed files with 90 additions and 42 deletions

View File

@@ -17,6 +17,7 @@
#include "config.h"
#include "core.h"
#include "../../string_type.h"
#include <string>
#ifdef ENABLE_NETWORK
@@ -88,7 +89,9 @@ public:
uint32 Recv_uint32();
uint64 Recv_uint64();
void Recv_string(char *buffer, size_t size, StringValidationSettings settings = SVS_REPLACE_WITH_QUESTION_MARK);
void Recv_string(std::string &buffer, StringValidationSettings settings = SVS_REPLACE_WITH_QUESTION_MARK);
void Recv_binary(char *buffer, size_t size);
void Recv_binary(std::string &buffer, size_t size);
};
#endif /* ENABLE_NETWORK */