Codechange: automatic adding of _t to (u)int types, and WChar to char32_t
for i in `find src -type f|grep -v 3rdparty/fmt|grep -v 3rdparty/catch2|grep -v 3rdparty/opengl|grep -v stdafx.h`; do sed 's/uint16& /uint16 \&/g;s/int8\([ >*),;[]\)/int8_t\1/g;s/int16\([ >*),;[]\)/int16_t\1/g;s/int32\([ >*),;[]\)/int32_t\1/g;s/int64\([ >*),;[]\)/int64_t\1/g;s/ uint32(/ uint32_t(/g;s/_uint8_t/_uint8/;s/Uint8_t/Uint8/;s/ft_int64_t/ft_int64/g;s/uint64$/uint64_t/;s/WChar/char32_t/g;s/char32_t char32_t/char32_t WChar/' -i $i; done
This commit is contained in:
@@ -17,8 +17,8 @@
|
||||
#include "core.h"
|
||||
#include "../../string_type.h"
|
||||
|
||||
typedef uint16 PacketSize; ///< Size of the whole packet.
|
||||
typedef uint8 PacketType; ///< Identifier for the packet
|
||||
typedef uint16_t PacketSize; ///< Size of the whole packet.
|
||||
typedef uint8_t PacketType; ///< Identifier for the packet
|
||||
|
||||
/**
|
||||
* Internal entity of a packet. As everything is sent as a packet,
|
||||
@@ -65,10 +65,10 @@ public:
|
||||
|
||||
bool CanWriteToPacket(size_t bytes_to_write);
|
||||
void Send_bool (bool data);
|
||||
void Send_uint8 (uint8 data);
|
||||
void Send_uint16(uint16 data);
|
||||
void Send_uint32(uint32 data);
|
||||
void Send_uint64(uint64 data);
|
||||
void Send_uint8 (uint8_t data);
|
||||
void Send_uint16(uint16_t data);
|
||||
void Send_uint32(uint32_t data);
|
||||
void Send_uint64(uint64_t data);
|
||||
void Send_string(const std::string_view data);
|
||||
void Send_buffer(const std::vector<byte> &data);
|
||||
size_t Send_bytes (const byte *begin, const byte *end);
|
||||
@@ -82,10 +82,10 @@ public:
|
||||
|
||||
bool CanReadFromPacket(size_t bytes_to_read, bool close_connection = false);
|
||||
bool Recv_bool ();
|
||||
uint8 Recv_uint8 ();
|
||||
uint16 Recv_uint16();
|
||||
uint32 Recv_uint32();
|
||||
uint64 Recv_uint64();
|
||||
uint8_t Recv_uint8 ();
|
||||
uint16_t Recv_uint16();
|
||||
uint32_t Recv_uint32();
|
||||
uint64_t Recv_uint64();
|
||||
std::vector<byte> Recv_buffer();
|
||||
std::string Recv_string(size_t length, StringValidationSettings settings = SVS_REPLACE_WITH_QUESTION_MARK);
|
||||
|
||||
|
Reference in New Issue
Block a user