summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorNeoBrainX <NeoBrainX@googlemail.com>2010-08-13 19:07:59 +0000
committerNeoBrainX <NeoBrainX@googlemail.com>2010-08-13 19:07:59 +0000
commit1f9dbb5afe17845d45d1bb6365f41d0879ccb1d0 (patch)
tree28f28e61e3f062aad40c04e0e322775494d706f1 /Source/Core
parent0c1977dc455f9fd5d3cd67a138da2fa4b516a2e2 (diff)
Warning fixes and some cleanups.
Correct me if I was wrong when changing those 0s to '\0's. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6093 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/DSPCore/Src/disassemble.cpp2
-rw-r--r--Source/Core/DiscIO/Src/VolumeGC.cpp16
-rw-r--r--Source/Core/DiscIO/Src/VolumeWiiCrypted.cpp40
3 files changed, 29 insertions, 29 deletions
diff --git a/Source/Core/DSPCore/Src/disassemble.cpp b/Source/Core/DSPCore/Src/disassemble.cpp
index 8a9b67ae59..64d4497ae9 100644
--- a/Source/Core/DSPCore/Src/disassemble.cpp
+++ b/Source/Core/DSPCore/Src/disassemble.cpp
@@ -202,7 +202,7 @@ bool DSPDisassembler::DisOpcode(const u16 *binbuf, int base_addr, int pass, u16
if ((*pc & 0x7fff) >= 0x1000)
{
- *pc++;
+ ++pc;
dest.append("; outside memory");
return false;
}
diff --git a/Source/Core/DiscIO/Src/VolumeGC.cpp b/Source/Core/DiscIO/Src/VolumeGC.cpp
index d4bb82506f..e329b5d35f 100644
--- a/Source/Core/DiscIO/Src/VolumeGC.cpp
+++ b/Source/Core/DiscIO/Src/VolumeGC.cpp
@@ -78,12 +78,12 @@ IVolume::ECountry CVolumeGC::GetCountry() const
std::string CVolumeGC::GetMakerID() const
{
if (m_pReader == NULL)
- return false;
+ return std::string();
char makerID[3];
if (!Read(0x4, 0x2, (u8*)&makerID))
- return false;
- makerID[2] = 0;
+ return std::string();
+ makerID[2] = '\0';
return makerID;
}
@@ -103,11 +103,11 @@ std::string CVolumeGC::GetName() const
u32 CVolumeGC::GetFSTSize() const
{
if (m_pReader == NULL)
- return false;
+ return 0;
u32 size;
if (!Read(0x428, 0x4, (u8*)&size))
- return false;
+ return 0;
return Common::swap32(size);
}
@@ -115,13 +115,13 @@ u32 CVolumeGC::GetFSTSize() const
std::string CVolumeGC::GetApploaderDate() const
{
if (m_pReader == NULL)
- return false;
+ return std::string();
char date[16];
if (!Read(0x2440, 0x10, (u8*)&date))
- return false;
+ return std::string();
// Should be 0 already, but just in case
- date[10] = 0;
+ date[10] = '\0';
return date;
}
diff --git a/Source/Core/DiscIO/Src/VolumeWiiCrypted.cpp b/Source/Core/DiscIO/Src/VolumeWiiCrypted.cpp
index 935f101021..f72e4c5f89 100644
--- a/Source/Core/DiscIO/Src/VolumeWiiCrypted.cpp
+++ b/Source/Core/DiscIO/Src/VolumeWiiCrypted.cpp
@@ -107,19 +107,19 @@ std::string CVolumeWiiCrypted::GetUniqueID() const
{
if (m_pReader == NULL)
{
- return(false);
+ return std::string();
}
char ID[7];
if (!Read(0, 6, (u8*)ID))
{
- return(false);
+ return std::string();
}
- ID[6] = 0;
+ ID[6] = '\0';
- return(ID);
+ return ID;
}
@@ -138,83 +138,83 @@ std::string CVolumeWiiCrypted::GetMakerID() const
{
if (m_pReader == NULL)
{
- return(false);
+ return std::string();
}
char makerID[3];
if (!Read(0x4, 0x2, (u8*)&makerID))
{
- return(false);
+ return std::string();
}
- makerID[2] = 0;
+ makerID[2] = '\0';
- return(makerID);
+ return makerID;
}
std::string CVolumeWiiCrypted::GetName() const
{
if (m_pReader == NULL)
{
- return("");
+ return std::string();
}
char name[0xFF];
if (!Read(0x20, 0x60, (u8*)&name))
{
- return("");
+ return std::string();
}
- return(name);
+ return name;
}
u32 CVolumeWiiCrypted::GetFSTSize() const
{
if (m_pReader == NULL)
{
- return(false);
+ return 0;
}
u32 size;
if (!Read(0x428, 0x4, (u8*)&size))
{
- return(false);
+ return 0;
}
- return(size);
+ return size;
}
std::string CVolumeWiiCrypted::GetApploaderDate() const
{
if (m_pReader == NULL)
{
- return(false);
+ return std::string();
}
char date[16];
if (!Read(0x2440, 0x10, (u8*)&date))
{
- return(false);
+ return std::string();
}
- date[10] = 0;
+ date[10] = '\0';
- return(date);
+ return date;
}
u64 CVolumeWiiCrypted::GetSize() const
{
if (m_pReader)
{
- return(m_pReader->GetDataSize());
+ return m_pReader->GetDataSize();
}
else
{
- return(0);
+ return 0;
}
}