From 5767691f4e9260b25f440ef42bb9853aeba89b56 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 23 Jul 2014 20:26:54 -0400 Subject: [PATCH] Get rid of a few C-style struct declarations --- Source/Core/Core/DSP/DSPTables.h | 4 ++-- Source/Core/Core/HW/MemmapFunctions.cpp | 4 ++-- Source/Core/Core/HW/WiimoteEmu/MatrixMath.h | 6 +++--- Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_es.h | 4 ++-- Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_net_ssl.h | 4 ++-- .../ForceFeedback/ForceFeedbackDevice.cpp | 4 ++-- Source/Core/VideoBackends/D3D/D3DUtil.cpp | 8 ++++---- Source/Core/VideoBackends/Software/EfbInterface.h | 10 ++++++---- 8 files changed, 23 insertions(+), 21 deletions(-) diff --git a/Source/Core/Core/DSP/DSPTables.h b/Source/Core/Core/DSP/DSPTables.h index 04255f66ad..d9d2fadba0 100644 --- a/Source/Core/Core/DSP/DSPTables.h +++ b/Source/Core/Core/DSP/DSPTables.h @@ -68,7 +68,7 @@ struct param2_t u16 mask; }; -typedef struct +struct DSPOPCTemplate { const char *name; u16 opcode; @@ -85,7 +85,7 @@ typedef struct bool uncond_branch; bool reads_pc; bool updates_sr; -} DSPOPCTemplate; +}; typedef DSPOPCTemplate opc_t; diff --git a/Source/Core/Core/HW/MemmapFunctions.cpp b/Source/Core/Core/HW/MemmapFunctions.cpp index cfcc06414c..1a7c86a6d6 100644 --- a/Source/Core/Core/HW/MemmapFunctions.cpp +++ b/Source/Core/Core/HW/MemmapFunctions.cpp @@ -609,12 +609,12 @@ void SDRUpdated() #define TLB_FLAG_MOST_RECENT 0x01 #define TLB_FLAG_INVALID 0x02 -typedef struct tlb_entry +struct tlb_entry { u32 tag; u32 paddr; u8 flags; -} tlb_entry; +}; // TODO: tlb needs to be in ppcState for save-state purposes. #ifdef FAST_TLB_CACHE diff --git a/Source/Core/Core/HW/WiimoteEmu/MatrixMath.h b/Source/Core/Core/HW/WiimoteEmu/MatrixMath.h index fce9d97544..bdab6fb663 100644 --- a/Source/Core/Core/HW/WiimoteEmu/MatrixMath.h +++ b/Source/Core/Core/HW/WiimoteEmu/MatrixMath.h @@ -11,10 +11,10 @@ #endif typedef double Matrix[4][4]; -typedef struct +struct Vertex { - double x,y,z; -} Vertex; + double x, y, z; +}; inline void MatrixIdentity(Matrix & m) { diff --git a/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_es.h b/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_es.h index c7fdbe1aa8..efa4f73bbf 100644 --- a/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_es.h +++ b/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_es.h @@ -143,7 +143,7 @@ private: bool IsValid(u64 _TitleID) const; - typedef struct ecc_cert_t + struct ecc_cert_t { u32 sig_type ; u8 sig [0x3c]; @@ -154,5 +154,5 @@ private: u32 ng_key_id ; u8 ecc_pubkey [0x3c]; u8 padding [0x3c]; - } ecc_cert_t; + }; }; diff --git a/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_net_ssl.h b/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_net_ssl.h index b14ad41c06..bf2fdf48d5 100644 --- a/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_net_ssl.h +++ b/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_net_ssl.h @@ -54,7 +54,7 @@ enum SSL_IOCTL IOCTLV_NET_SSL_DEBUGGETTIME = 0x15, }; -typedef struct +struct WII_SSL { ssl_context ctx; ssl_session session; @@ -66,7 +66,7 @@ typedef struct int sockfd; char hostname[NET_SSL_MAX_HOSTNAME_LEN]; bool active; -} WII_SSL; +}; class CWII_IPC_HLE_Device_net_ssl : public IWII_IPC_HLE_Device { diff --git a/Source/Core/InputCommon/ControllerInterface/ForceFeedback/ForceFeedbackDevice.cpp b/Source/Core/InputCommon/ControllerInterface/ForceFeedback/ForceFeedbackDevice.cpp index 57abcb1b1f..ed8cfbf998 100644 --- a/Source/Core/InputCommon/ControllerInterface/ForceFeedback/ForceFeedbackDevice.cpp +++ b/Source/Core/InputCommon/ControllerInterface/ForceFeedback/ForceFeedbackDevice.cpp @@ -15,11 +15,11 @@ template class ForceFeedbackDevice::Force; template class ForceFeedbackDevice::Force; template class ForceFeedbackDevice::Force; -typedef struct +struct ForceType { GUID guid; const std::string name; -} ForceType; +}; static const ForceType force_type_names[] = { diff --git a/Source/Core/VideoBackends/D3D/D3DUtil.cpp b/Source/Core/VideoBackends/D3D/D3DUtil.cpp index cf31b8a757..f8d91df952 100644 --- a/Source/Core/VideoBackends/D3D/D3DUtil.cpp +++ b/Source/Core/VideoBackends/D3D/D3DUtil.cpp @@ -419,10 +419,10 @@ int CD3DFont::DrawTextScaled(float x, float y, float size, float spacing, u32 dw ID3D11SamplerState* linear_copy_sampler = nullptr; ID3D11SamplerState* point_copy_sampler = nullptr; -typedef struct { float x,y,z,u,v,w; } STQVertex; -typedef struct { float x,y,z,u,v,w; } STSQVertex; -typedef struct { float x,y,z; u32 col; } ClearVertex; -typedef struct { float x,y,z; u32 col; } ColVertex; +struct STQVertex { float x, y, z, u, v, w; }; +struct STSQVertex { float x, y, z, u, v, w; }; +struct ClearVertex { float x, y, z; u32 col; }; +struct ColVertex { float x, y, z; u32 col; }; struct { diff --git a/Source/Core/VideoBackends/Software/EfbInterface.h b/Source/Core/VideoBackends/Software/EfbInterface.h index c264713715..d09f71333c 100644 --- a/Source/Core/VideoBackends/Software/EfbInterface.h +++ b/Source/Core/VideoBackends/Software/EfbInterface.h @@ -12,18 +12,20 @@ namespace EfbInterface // xfb color format - packed so the compiler doesn't mess with alignment #pragma pack(push,1) - typedef struct { + struct yuv422_packed + { u8 Y; u8 UV; - } yuv422_packed; + }; #pragma pack(pop) // But this struct is only used internally, so we could optimise alignment - typedef struct { + struct yuv444 + { u8 Y; s8 U; s8 V; - } yuv444; + }; enum { ALP_C, BLU_C, GRN_C, RED_C };