summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfacugaich <facugaich@gmail.com>2008-12-20 18:46:49 +0000
committerfacugaich <facugaich@gmail.com>2008-12-20 18:46:49 +0000
commit3be88bb2dd59136a3d69ea9c8381333987fb20b2 (patch)
tree4a1b1043466ec41121453c8e3dac5184e37a9f0a
parented75de40f4c7f9c0f7c912d8956a78b7540f655c (diff)
- Janitorial tasks
- Bugfix in ARCode/Patch editor git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1612 8ced0084-cf51-0410-be5f-012b33b47a6e
-rw-r--r--Source/Core/Core/Src/Boot/Boot_ELF.cpp4
-rw-r--r--Source/Core/Core/Src/Debugger/Dump.cpp2
-rw-r--r--Source/Core/DebuggerWX/Src/LogWindow.cpp2
-rw-r--r--Source/Core/DiscIO/Src/BannerLoaderGC.cpp2
-rw-r--r--Source/Core/DiscIO/Src/BannerLoaderWii.cpp2
-rw-r--r--Source/Core/DiscIO/Src/FileHandlerARC.cpp8
-rw-r--r--Source/Core/DiscIO/Src/FileSystemGCWii.cpp4
-rw-r--r--Source/Core/DiscIO/Src/VolumeCreator.cpp2
-rw-r--r--Source/Core/DiscIO/Src/stdafx.h3
-rw-r--r--Source/Core/DolphinWX/Src/ARCodeAddEdit.cpp2
-rw-r--r--Source/Core/DolphinWX/Src/ISOProperties.cpp4
-rw-r--r--Source/Core/DolphinWX/Src/PatchAddEdit.cpp2
-rw-r--r--Source/Plugins/Plugin_DSP_HLE/Src/Logging/Console.cpp2
-rw-r--r--Source/Plugins/Plugin_VideoOGL/Src/Logging/Console.cpp2
-rw-r--r--Source/Plugins/Plugin_Wiimote/Src/Console.cpp2
15 files changed, 22 insertions, 21 deletions
diff --git a/Source/Core/Core/Src/Boot/Boot_ELF.cpp b/Source/Core/Core/Src/Boot/Boot_ELF.cpp
index ce5d6d6ffb..087c2dbe16 100644
--- a/Source/Core/Core/Src/Boot/Boot_ELF.cpp
+++ b/Source/Core/Core/Src/Boot/Boot_ELF.cpp
@@ -31,7 +31,7 @@ bool CBoot::IsElfWii(const char *filename)
u64 filesize = ftell(f);
fseek(f, 0, SEEK_SET);
u8 *mem = new u8[(size_t)filesize];
- fread(mem, 1, filesize, f);
+ fread(mem, 1, (size_t)filesize, f);
fclose(f);
ElfReader reader(mem);
@@ -50,7 +50,7 @@ bool CBoot::Boot_ELF(const char *filename)
u64 filesize = ftell(f);
fseek(f, 0, SEEK_SET);
u8 *mem = new u8[(size_t)filesize];
- fread(mem, 1, filesize, f);
+ fread(mem, 1, (size_t)filesize, f);
fclose(f);
ElfReader reader(mem);
diff --git a/Source/Core/Core/Src/Debugger/Dump.cpp b/Source/Core/Core/Src/Debugger/Dump.cpp
index 93c95fb0a7..4eafc2fe60 100644
--- a/Source/Core/Core/Src/Debugger/Dump.cpp
+++ b/Source/Core/Core/Src/Debugger/Dump.cpp
@@ -27,7 +27,7 @@ CDump::CDump(const char* _szFilename) :
if (pStream != NULL)
{
fseek(pStream, 0, SEEK_END);
- m_size = ftell(pStream);
+ m_size = (size_t) ftell(pStream);
fseek(pStream, 0, SEEK_SET);
m_pData = new u8[m_size];
diff --git a/Source/Core/DebuggerWX/Src/LogWindow.cpp b/Source/Core/DebuggerWX/Src/LogWindow.cpp
index 7c14c96368..d3c92bdfcd 100644
--- a/Source/Core/DebuggerWX/Src/LogWindow.cpp
+++ b/Source/Core/DebuggerWX/Src/LogWindow.cpp
@@ -73,7 +73,7 @@ CLogWindow::CLogWindow(wxWindow* parent)
m_options->SetMinSize(wxSize(m_options->GetSize().GetWidth() - 40,
m_options->GetCount() * 15));
#ifdef _WIN32
- for (int i = 0; i < m_options->GetCount(); ++i)
+ for (unsigned int i = 0; i < m_options->GetCount(); ++i)
m_options->GetItem(i)->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE));
#endif
diff --git a/Source/Core/DiscIO/Src/BannerLoaderGC.cpp b/Source/Core/DiscIO/Src/BannerLoaderGC.cpp
index 2480739979..994dbadcf0 100644
--- a/Source/Core/DiscIO/Src/BannerLoaderGC.cpp
+++ b/Source/Core/DiscIO/Src/BannerLoaderGC.cpp
@@ -42,7 +42,7 @@ CBannerLoaderGC::CBannerLoaderGC(DiscIO::IFileSystem& _rFileSystem)
}
// load the opening.bnr
- size_t FileSize = _rFileSystem.GetFileSize("opening.bnr");
+ size_t FileSize = (size_t) _rFileSystem.GetFileSize("opening.bnr");
if (FileSize > 0)
{
diff --git a/Source/Core/DiscIO/Src/BannerLoaderWii.cpp b/Source/Core/DiscIO/Src/BannerLoaderWii.cpp
index e9048fc41d..f58e98b93c 100644
--- a/Source/Core/DiscIO/Src/BannerLoaderWii.cpp
+++ b/Source/Core/DiscIO/Src/BannerLoaderWii.cpp
@@ -38,7 +38,7 @@ CBannerLoaderWii::CBannerLoaderWii(DiscIO::IFileSystem& _rFileSystem)
sprintf(Filename, FULL_WII_USER_DIR "title/00010000/%02x%02x%02x%02x/data/banner.bin", (u8)TitleID[0], (u8)TitleID[1], (u8)TitleID[2], (u8)TitleID[3]);
// load the opening.bnr
- size_t FileSize = File::GetSize(Filename);
+ size_t FileSize = (size_t) File::GetSize(Filename);
if (FileSize > 0)
{
diff --git a/Source/Core/DiscIO/Src/FileHandlerARC.cpp b/Source/Core/DiscIO/Src/FileHandlerARC.cpp
index e9a7b96044..5b05c6ae31 100644
--- a/Source/Core/DiscIO/Src/FileHandlerARC.cpp
+++ b/Source/Core/DiscIO/Src/FileHandlerARC.cpp
@@ -65,7 +65,7 @@ CARCFile::GetFileSize(const std::string& _rFullPath)
if (pFileInfo != NULL)
{
- return(pFileInfo->m_FileSize);
+ return((size_t) pFileInfo->m_FileSize);
}
return(0);
@@ -93,7 +93,7 @@ CARCFile::ReadFile(const std::string& _rFullPath, u8* _pBuffer, size_t _MaxBuffe
}
memcpy(_pBuffer, &m_pBuffer[pFileInfo->m_Offset], pFileInfo->m_FileSize);
- return(pFileInfo->m_FileSize);
+ return((size_t) pFileInfo->m_FileSize);
}
@@ -119,7 +119,7 @@ CARCFile::ExportFile(const std::string& _rFullPath, const std::string& _rExportF
return(false);
}
- fwrite(&m_pBuffer[pFileInfo->m_Offset], pFileInfo->m_FileSize, 1, pFile);
+ fwrite(&m_pBuffer[pFileInfo->m_Offset], (size_t) pFileInfo->m_FileSize, 1, pFile);
fclose(pFile);
return(true);
}
@@ -199,7 +199,7 @@ CARCFile::BuildFilenames(const size_t _FirstIndex, const size_t _LastIndex, cons
sprintf(rFileInfo.m_FullPath, "%s\\", &_szNameTable[uOffset]);
}
- CurrentIndex = BuildFilenames(CurrentIndex + 1, rFileInfo.m_FileSize, rFileInfo.m_FullPath, _szNameTable);
+ CurrentIndex = BuildFilenames(CurrentIndex + 1, (size_t) rFileInfo.m_FileSize, rFileInfo.m_FullPath, _szNameTable);
}
else
{
diff --git a/Source/Core/DiscIO/Src/FileSystemGCWii.cpp b/Source/Core/DiscIO/Src/FileSystemGCWii.cpp
index 13376e447c..f9478fe5dd 100644
--- a/Source/Core/DiscIO/Src/FileSystemGCWii.cpp
+++ b/Source/Core/DiscIO/Src/FileSystemGCWii.cpp
@@ -88,7 +88,7 @@ u64 CFileSystemGCWii::ReadFile(const char* _rFullPath, u8* _pBuffer, size_t _Max
bool CFileSystemGCWii::ExportFile(const char* _rFullPath, const char* _rExportFilename) const
{
- size_t filesize = GetFileSize(_rFullPath);
+ size_t filesize = (size_t) GetFileSize(_rFullPath);
if (filesize == 0)
return false;
@@ -229,7 +229,7 @@ size_t CFileSystemGCWii::BuildFilenames(const size_t _FirstIndex, const size_t _
else
CharArrayFromFormat(rFileInfo->m_FullPath, "%s\\", filename);
- CurrentIndex = BuildFilenames(CurrentIndex + 1, rFileInfo->m_FileSize, rFileInfo->m_FullPath, _NameTableOffset);
+ CurrentIndex = BuildFilenames(CurrentIndex + 1, (size_t) rFileInfo->m_FileSize, rFileInfo->m_FullPath, _NameTableOffset);
}
else
{
diff --git a/Source/Core/DiscIO/Src/VolumeCreator.cpp b/Source/Core/DiscIO/Src/VolumeCreator.cpp
index 2ff5e8471b..029bcbaf86 100644
--- a/Source/Core/DiscIO/Src/VolumeCreator.cpp
+++ b/Source/Core/DiscIO/Src/VolumeCreator.cpp
@@ -150,7 +150,7 @@ IVolume* CreateVolumeFromCryptedWiiImage(IBlobReader& _rReader, u32 _VolumeType)
for(int i=0;i<16;i++)
{
char h[3]={*(t++),*(t++),0};
- binkey[i] = strtol(h,NULL,16);
+ binkey[i] = (char) strtol(h,NULL,16);
}
pT = fopen(WII_MASTERKEY_FILE, "wb");
diff --git a/Source/Core/DiscIO/Src/stdafx.h b/Source/Core/DiscIO/Src/stdafx.h
index 2949974115..cd41c1e39e 100644
--- a/Source/Core/DiscIO/Src/stdafx.h
+++ b/Source/Core/DiscIO/Src/stdafx.h
@@ -23,7 +23,10 @@
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
+#ifndef _CRT_SECURE_NO_DEPRECATE
#define _CRT_SECURE_NO_DEPRECATE
+#endif
+
#define _SCL_SECURE_NO_DEPRECATE
diff --git a/Source/Core/DolphinWX/Src/ARCodeAddEdit.cpp b/Source/Core/DolphinWX/Src/ARCodeAddEdit.cpp
index 77529add7f..dec2c32518 100644
--- a/Source/Core/DolphinWX/Src/ARCodeAddEdit.cpp
+++ b/Source/Core/DolphinWX/Src/ARCodeAddEdit.cpp
@@ -45,7 +45,7 @@ void CARCodeAddEdit::CreateGUIControls(int _selection)
EditCheatName = new wxTextCtrl(this, ID_EDITCHEAT_NAME, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0);
EditCheatName->SetValue(wxString::FromAscii(currentCode.name.c_str()));
EntrySelection = new wxSpinButton(this, ID_ENTRY_SELECT, wxDefaultPosition, wxDefaultSize, wxVERTICAL);
- EntrySelection->SetRange(0, (int)arCodes.size()-1);
+ EntrySelection->SetRange((int)arCodes.size()-1, 0);
EntrySelection->SetValue(_selection);
EditCheatCode = new wxTextCtrl(this, ID_EDITCHEAT_CODE, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE);
UpdateTextCtrl(currentCode);
diff --git a/Source/Core/DolphinWX/Src/ISOProperties.cpp b/Source/Core/DolphinWX/Src/ISOProperties.cpp
index 9233739980..ed7c94e5c5 100644
--- a/Source/Core/DolphinWX/Src/ISOProperties.cpp
+++ b/Source/Core/DolphinWX/Src/ISOProperties.cpp
@@ -650,9 +650,7 @@ void CISOProperties::PatchList_Save()
for (std::vector<PatchEngine::PatchEntry>::const_iterator iter2 = onFrame_it->entries.begin(); iter2 != onFrame_it->entries.end(); ++iter2)
{
- std::string temp;
- ToStringFromFormat(&temp, "0x%08X:%s:0x%08X", iter2->address, PatchEngine::PatchTypeStrings[iter2->type], iter2->value);
- lines.push_back(temp);
+ lines.push_back(std::string(wxString::Format(wxT("0x%08X:%s:0x%08X"), iter2->address, PatchEngine::PatchTypeStrings[iter2->type], iter2->value).mb_str()));
}
++index;
}
diff --git a/Source/Core/DolphinWX/Src/PatchAddEdit.cpp b/Source/Core/DolphinWX/Src/PatchAddEdit.cpp
index e1328f6a7f..0567307a5d 100644
--- a/Source/Core/DolphinWX/Src/PatchAddEdit.cpp
+++ b/Source/Core/DolphinWX/Src/PatchAddEdit.cpp
@@ -48,7 +48,7 @@ void CPatchAddEdit::CreateGUIControls(int _selection)
EditPatchOffset = new wxTextCtrl(this, ID_EDITPATCH_OFFSET, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0);
EditPatchOffset->SetValue(wxString::Format(wxT("%08X"), currentEntries.at(0).address));
EntrySelection = new wxSpinButton(this, ID_ENTRY_SELECT, wxDefaultPosition, wxDefaultSize, wxVERTICAL);
- EntrySelection->SetRange(0, (int)currentEntries.size()-1);
+ EntrySelection->SetRange((int)currentEntries.size()-1, 0);
wxArrayString wxArrayStringFor_EditPatchType;
for (int i = 0; i < 3; ++i)
wxArrayStringFor_EditPatchType.Add(wxString::FromAscii(PatchEngine::PatchTypeStrings[i]));
diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/Logging/Console.cpp b/Source/Plugins/Plugin_DSP_HLE/Src/Logging/Console.cpp
index 75207b0749..6188b75798 100644
--- a/Source/Plugins/Plugin_DSP_HLE/Src/Logging/Console.cpp
+++ b/Source/Plugins/Plugin_DSP_HLE/Src/Logging/Console.cpp
@@ -83,7 +83,7 @@ void startConsoleWin(int width, int height, char* fname)
// Edit the log file name
std::string FileEnding = ".log";
std::string FileName = fname;
- char buffer[33]; itoa(i, buffer, 10); // convert number to string
+ char buffer[33]; _itoa(i, buffer, 10); // convert number to string
std::string FullFilename = (FileName + buffer + FileEnding);
__fStdOut[i] = fopen(FullFilename.c_str(), "w");
}
diff --git a/Source/Plugins/Plugin_VideoOGL/Src/Logging/Console.cpp b/Source/Plugins/Plugin_VideoOGL/Src/Logging/Console.cpp
index 61cd38b01e..07ee9c1138 100644
--- a/Source/Plugins/Plugin_VideoOGL/Src/Logging/Console.cpp
+++ b/Source/Plugins/Plugin_VideoOGL/Src/Logging/Console.cpp
@@ -81,7 +81,7 @@ void startConsoleWin(int width, int height, char* fname)
// Edit the log file name
std::string FileEnding = ".log";
std::string FileName = fname;
- char buffer[33]; itoa(i, buffer, 10); // convert number to string
+ char buffer[33]; _itoa(i, buffer, 10); // convert number to string
std::string FullFilename = (FileName + buffer + FileEnding);
__fStdOut[i] = fopen(FullFilename.c_str(), "w");
}
diff --git a/Source/Plugins/Plugin_Wiimote/Src/Console.cpp b/Source/Plugins/Plugin_Wiimote/Src/Console.cpp
index 5ff05f281f..e366b498e2 100644
--- a/Source/Plugins/Plugin_Wiimote/Src/Console.cpp
+++ b/Source/Plugins/Plugin_Wiimote/Src/Console.cpp
@@ -77,7 +77,7 @@ void startConsoleWin(int width, int height, char* fname)
// Edit the log file name
std::string FileEnding = ".log";
std::string FileName = fname;
- char buffer[33]; itoa(i, buffer, 10); // convert number to string
+ char buffer[33]; _itoa(i, buffer, 10); // convert number to string
std::string FullFilename = (FileName + buffer + FileEnding);
__fStdOut[i] = fopen(FullFilename.c_str(), "w");
}