diff --git a/src/core/hle/service/nifm/nifm.h b/src/core/hle/service/nifm/nifm.h index b720e180e3..4526bf9559 100644 --- a/src/core/hle/service/nifm/nifm.h +++ b/src/core/hle/service/nifm/nifm.h @@ -4,6 +4,10 @@ #pragma once +#include +#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 ssid{}; @@ -39,10 +38,8 @@ struct WirelessSettingData { std::array 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 ssid{}; @@ -51,28 +48,21 @@ struct SfWirelessSettingData { u8 unk3{}; std::array 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 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)