Address review comments (1/2)

This commit is contained in:
VolcaEM
2020-04-27 02:50:42 +02:00
committed by GitHub
parent b698cb8d04
commit 4aa2845240

View File

@@ -4,6 +4,10 @@
#pragma once
#include <array>
#include "common/common_funcs.h"
#include "common/common_types.h"
namespace Service::SM {
class ServiceManager;
}
@@ -14,21 +18,16 @@ class System;
namespace Service::NIFM {
#pragma pack(1)
struct ClientId {
u32 client_id{};
};
#pragma pack()
static_assert(sizeof(ClientId) == 0x4, "ClientId has incorrect size.");
#pragma pack(1)
struct Uuid {
u128 uuid{};
};
#pragma pack()
static_assert(sizeof(Uuid) == 0x10, "Uuid has incorrect size.");
#pragma pack(1)
struct WirelessSettingData {
u8 ssid_length{};
std::array<u8, 0x21> ssid{};
@@ -39,10 +38,8 @@ struct WirelessSettingData {
std::array<u8, 0x41> passphrase{};
INSERT_PADDING_BYTES(0x3);
};
#pragma pack()
static_assert(sizeof(WirelessSettingData) == 0x70, "WirelessSettingData has incorrect size.");
#pragma pack(1)
struct SfWirelessSettingData {
u8 ssid_length{};
std::array<u8, 0x20> ssid{};
@@ -51,28 +48,21 @@ struct SfWirelessSettingData {
u8 unk3{};
std::array<u8, 0x41> passphrase{};
};
#pragma pack()
static_assert(sizeof(SfWirelessSettingData) == 0x65, "SfWirelessSettingData has incorrect size.");
#pragma pack(1)
struct IpAddress {
u32 address{};
};
#pragma pack()
static_assert(sizeof(IpAddress) == 0x4, "IpAddress has incorrect size.");
#pragma pack(1)
struct SubnetMask {
u32 mask{};
};
#pragma pack()
static_assert(sizeof(SubnetMask) == 0x4, "SubnetMask has incorrect size.");
#pragma pack(1)
struct Gateway {
u32 gateway{};
};
#pragma pack()
static_assert(sizeof(Gateway) == 0x4, "Gateway has incorrect size.");
#pragma pack(1)
@@ -94,7 +84,6 @@ struct DNSSetting {
#pragma pack()
static_assert(sizeof(DNSSetting) == 0x9, "DNSSetting has incorrect size.");
#pragma pack(1)
struct ProxySetting {
u8 use_proxy{};
INSERT_PADDING_BYTES(0x1);
@@ -105,17 +94,14 @@ struct ProxySetting {
std::array<u8, 0x20> password{};
INSERT_PADDING_BYTES(0x1);
};
#pragma pack()
static_assert(sizeof(ProxySetting) == 0xAA, "ProxySetting has incorrect size.");
#pragma pack(1)
struct IpSettingData {
IpAddressSetting address_settings{};
DNSSetting dns_settings{};
ProxySetting proxy_settings{};
u16 mtu{};
};
#pragma pack()
static_assert(sizeof(IpSettingData) == 0xC2, "IpSettingData has incorrect size.");
#pragma pack(1)