Prefix all size_t with std::
done automatically by executing regex replace `([^:0-9a-zA-Z_])size_t([^0-9a-zA-Z_])` -> `$1std::size_t$2`
This commit is contained in:
parent
eca98eeb3e
commit
7d8f115185
158 changed files with 669 additions and 634 deletions
|
@ -9,7 +9,7 @@
|
|||
|
||||
namespace InputCommon::CemuhookUDP {
|
||||
|
||||
static const size_t GetSizeOfResponseType(Type t) {
|
||||
static const std::size_t GetSizeOfResponseType(Type t) {
|
||||
switch (t) {
|
||||
case Type::Version:
|
||||
return sizeof(Response::Version);
|
||||
|
@ -29,7 +29,7 @@ namespace Response {
|
|||
* Note: Modifies the buffer to zero out the crc (since thats the easiest way to check without
|
||||
* copying the buffer)
|
||||
*/
|
||||
boost::optional<Type> Validate(u8* data, size_t size) {
|
||||
boost::optional<Type> Validate(u8* data, std::size_t size) {
|
||||
if (size < sizeof(Header)) {
|
||||
LOG_DEBUG(Input, "Invalid UDP packet received");
|
||||
return boost::none;
|
||||
|
@ -53,7 +53,7 @@ boost::optional<Type> Validate(u8* data, size_t size) {
|
|||
// and also verify that the packet info mentions the correct size. Since the spec includes the
|
||||
// type of the packet as part of the data, we need to include it in size calculations here
|
||||
// ie: payload_length == sizeof(T) + sizeof(Type)
|
||||
const size_t data_len = GetSizeOfResponseType(header.type);
|
||||
const std::size_t data_len = GetSizeOfResponseType(header.type);
|
||||
if (header.payload_length != data_len + sizeof(Type) || size < data_len + sizeof(Header)) {
|
||||
LOG_ERROR(
|
||||
Input,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue