Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #665 from lioncash/cisms
Get rid of a few C-style struct declarations
  • Loading branch information
delroth committed Jul 24, 2014
2 parents e3dde59 + 5767691 commit 2644594
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 21 deletions.
4 changes: 2 additions & 2 deletions Source/Core/Core/DSP/DSPTables.h
Expand Up @@ -68,7 +68,7 @@ struct param2_t
u16 mask;
};

typedef struct
struct DSPOPCTemplate
{
const char *name;
u16 opcode;
Expand All @@ -85,7 +85,7 @@ typedef struct
bool uncond_branch;
bool reads_pc;
bool updates_sr;
} DSPOPCTemplate;
};

typedef DSPOPCTemplate opc_t;

Expand Down
4 changes: 2 additions & 2 deletions Source/Core/Core/HW/MemmapFunctions.cpp
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions Source/Core/Core/HW/WiimoteEmu/MatrixMath.h
Expand Up @@ -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)
{
Expand Down
4 changes: 2 additions & 2 deletions Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_es.h
Expand Up @@ -143,7 +143,7 @@ class CWII_IPC_HLE_Device_es : public IWII_IPC_HLE_Device

bool IsValid(u64 _TitleID) const;

typedef struct ecc_cert_t
struct ecc_cert_t
{
u32 sig_type ;
u8 sig [0x3c];
Expand All @@ -154,5 +154,5 @@ class CWII_IPC_HLE_Device_es : public IWII_IPC_HLE_Device
u32 ng_key_id ;
u8 ecc_pubkey [0x3c];
u8 padding [0x3c];
} ecc_cert_t;
};
};
4 changes: 2 additions & 2 deletions Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_net_ssl.h
Expand Up @@ -54,7 +54,7 @@ enum SSL_IOCTL
IOCTLV_NET_SSL_DEBUGGETTIME = 0x15,
};

typedef struct
struct WII_SSL
{
ssl_context ctx;
ssl_session session;
Expand All @@ -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
{
Expand Down
Expand Up @@ -16,11 +16,11 @@ template class ForceFeedbackDevice::Force<DICONSTANTFORCE>;
template class ForceFeedbackDevice::Force<DIRAMPFORCE>;
template class ForceFeedbackDevice::Force<DIPERIODIC>;

typedef struct
struct ForceType
{
GUID guid;
const std::string name;
} ForceType;
};

static const ForceType force_type_names[] =
{
Expand Down
8 changes: 4 additions & 4 deletions Source/Core/VideoBackends/D3D/D3DUtil.cpp
Expand Up @@ -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
{
Expand Down
10 changes: 6 additions & 4 deletions Source/Core/VideoBackends/Software/EfbInterface.h
Expand Up @@ -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 };

Expand Down

0 comments on commit 2644594

Please sign in to comment.