Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Clear up some warnings that crop up from -Wextra
  • Loading branch information
Sonicadvance1 committed Dec 30, 2012
1 parent e5d5365 commit ff3b22e
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 17 deletions.
2 changes: 1 addition & 1 deletion Source/Core/Core/Src/HW/EXI_DeviceEthernet.cpp
Expand Up @@ -290,7 +290,7 @@ bool CEXIETHERNET::IsWriteCommand(u32 const data)
return IsMXCommand(data) ? !!(data & (1 << 30)) : !!(data & (1 << 14));
}

char const * const CEXIETHERNET::GetRegisterName() const
const char* CEXIETHERNET::GetRegisterName() const
{
#define STR_RETURN(x) case x: return #x;

Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Core/Src/HW/EXI_DeviceEthernet.h
Expand Up @@ -297,7 +297,7 @@ class CEXIETHERNET : public IEXIDevice

bool IsMXCommand(u32 const data);
bool IsWriteCommand(u32 const data);
char const * const GetRegisterName() const;
const char* GetRegisterName() const;
void MXHardReset();
void MXCommandHandler(u32 data, u32 size);
void DirectFIFOWrite(u8 *data, u32 size);
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Core/Src/HW/EXI_DeviceIPL.h
Expand Up @@ -78,7 +78,7 @@ class CEXIIPL : public IEXIDevice

virtual void TransferByte(u8 &_uByte);
bool IsWriteCommand() const { return !!(m_uAddress & (1 << 31)); }
u32 const CommandRegion() const { return (m_uAddress & ~(1 << 31)) >> 8; }
const u32 CommandRegion() const { return (m_uAddress & ~(1 << 31)) >> 8; }

void LoadFileToIPL(std::string filename, u32 offset);
};
Expand Down
6 changes: 3 additions & 3 deletions Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_FileIO.cpp
Expand Up @@ -196,7 +196,7 @@ bool CWII_IPC_HLE_Device_FileIO::Seek(u32 _CommandAddress)
switch (Mode){
case 0:
{
if (SeekPosition >=0 && SeekPosition <= fileSize)
if (SeekPosition <= fileSize)
{
m_SeekPos = SeekPosition;
ReturnValue = m_SeekPos;
Expand All @@ -206,7 +206,7 @@ bool CWII_IPC_HLE_Device_FileIO::Seek(u32 _CommandAddress)
case 1:
{
u32 wantedPos = SeekPosition+m_SeekPos;
if (wantedPos >=0 && wantedPos <= fileSize)
if (wantedPos <= fileSize)
{
m_SeekPos = wantedPos;
ReturnValue = m_SeekPos;
Expand All @@ -216,7 +216,7 @@ bool CWII_IPC_HLE_Device_FileIO::Seek(u32 _CommandAddress)
case 2:
{
u64 wantedPos = fileSize+m_SeekPos;
if (wantedPos >=0 && wantedPos <= fileSize)
if (wantedPos <= fileSize)
{
m_SeekPos = wantedPos;
ReturnValue = m_SeekPos;
Expand Down
19 changes: 8 additions & 11 deletions Source/Core/VideoCommon/Src/VideoCommon.h
Expand Up @@ -44,17 +44,14 @@ enum
EFB_HEIGHT = 528,
};

enum
{
// XFB width is decided by EFB copy operation. The VI can do horizontal
// scaling (TODO: emulate).
MAX_XFB_WIDTH = EFB_WIDTH,

// Although EFB height is 528, 574-line XFB's can be created either with
// vertical scaling by the EFB copy operation or copying to multiple XFB's
// that are next to each other in memory (TODO: handle that situation).
MAX_XFB_HEIGHT = 574
};
// XFB width is decided by EFB copy operation. The VI can do horizontal
// scaling (TODO: emulate).
const u32 MAX_XFB_WIDTH = EFB_WIDTH;

// Although EFB height is 528, 574-line XFB's can be created either with
// vertical scaling by the EFB copy operation or copying to multiple XFB's
// that are next to each other in memory (TODO: handle that situation).
const u32 MAX_XFB_HEIGHT = 574;

// Logging
// ----------
Expand Down

0 comments on commit ff3b22e

Please sign in to comment.