summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorPierre Bourdon <delroth@gmail.com>2014-03-30 13:24:08 +0200
committerPierre Bourdon <delroth@gmail.com>2014-03-30 13:24:08 +0200
commit9b031786730594dd2c12ef0385fa22b76f172e2d (patch)
tree9605808f45393c2da7eb1bc9fecf361f7bd20e46 /Source/Core
parentb31d1fd3135d02b519adc5d48883eeb9b44be8e8 (diff)
parent92dd498fa70ea953a62731dfbeb08f89a76bc49a (diff)
Merge pull request #222 from comex/more-clang-fixes
More clang fixes
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/DolphinWX/ISOProperties.cpp2
-rw-r--r--Source/Core/VideoBackends/OGL/RasterFont.cpp2
-rw-r--r--Source/Core/VideoCommon/BPFunctions.cpp2
-rw-r--r--Source/Core/VideoCommon/BPMemory.h17
-rw-r--r--Source/Core/VideoCommon/RenderBase.cpp4
5 files changed, 14 insertions, 13 deletions
diff --git a/Source/Core/DolphinWX/ISOProperties.cpp b/Source/Core/DolphinWX/ISOProperties.cpp
index f3076c56f0..decbb3927c 100644
--- a/Source/Core/DolphinWX/ISOProperties.cpp
+++ b/Source/Core/DolphinWX/ISOProperties.cpp
@@ -899,7 +899,7 @@ void CISOProperties::OnExtractDataFromHeader(wxCommandEvent& event)
if (DiscIO::IsVolumeWiiDisc(OpenISO))
{
wxString Directory = m_Treectrl->GetItemText(m_Treectrl->GetSelection());
- int partitionNum = wxAtoi(Directory.Mid(Directory.find_first_of("0123456789"), 2));
+ unsigned int partitionNum = wxAtoi(Directory.Mid(Directory.find_first_of("0123456789"), 2));
if (WiiDisc.size() > partitionNum)
{
diff --git a/Source/Core/VideoBackends/OGL/RasterFont.cpp b/Source/Core/VideoBackends/OGL/RasterFont.cpp
index eb288d9414..8e6ad2d6c8 100644
--- a/Source/Core/VideoBackends/OGL/RasterFont.cpp
+++ b/Source/Core/VideoBackends/OGL/RasterFont.cpp
@@ -213,7 +213,7 @@ void RasterFont::printMultilineText(const std::string& text, double start_x, dou
continue;
}
- if (c < char_offset || c >= char_count+char_offset)
+ if ((u32) c < char_offset || (u32) c >= char_count+char_offset)
continue;
vertices[usage++] = x;
diff --git a/Source/Core/VideoCommon/BPFunctions.cpp b/Source/Core/VideoCommon/BPFunctions.cpp
index 58362f1a57..9bc9b4d3dd 100644
--- a/Source/Core/VideoCommon/BPFunctions.cpp
+++ b/Source/Core/VideoCommon/BPFunctions.cpp
@@ -161,7 +161,7 @@ void OnPixelFormatChange()
auto new_format = bpmem.zcontrol.pixel_format;
// no need to reinterpret pixel data in these cases
- if (new_format == old_format || old_format == (unsigned int)-1)
+ if (new_format == old_format || old_format == PEControl::INVALID_FMT)
goto skip;
// Check for pixel format changes
diff --git a/Source/Core/VideoCommon/BPMemory.h b/Source/Core/VideoCommon/BPMemory.h
index b5466097ac..5332c3e8d4 100644
--- a/Source/Core/VideoCommon/BPMemory.h
+++ b/Source/Core/VideoCommon/BPMemory.h
@@ -779,14 +779,15 @@ union PEControl
{
enum PixelFormat : u32
{
- RGB8_Z24 = 0,
- RGBA6_Z24 = 1,
- RGB565_Z16 = 2,
- Z24 = 3,
- Y8 = 4,
- U8 = 5,
- V8 = 6,
- YUV420 = 7
+ RGB8_Z24 = 0,
+ RGBA6_Z24 = 1,
+ RGB565_Z16 = 2,
+ Z24 = 3,
+ Y8 = 4,
+ U8 = 5,
+ V8 = 6,
+ YUV420 = 7,
+ INVALID_FMT = 0xffffffff, // Used by Dolphin to represent a missing value.
};
enum DepthFormat : u32
diff --git a/Source/Core/VideoCommon/RenderBase.cpp b/Source/Core/VideoCommon/RenderBase.cpp
index 12dc7b4bfc..8b42d1c23b 100644
--- a/Source/Core/VideoCommon/RenderBase.cpp
+++ b/Source/Core/VideoCommon/RenderBase.cpp
@@ -64,7 +64,7 @@ int Renderer::s_LastEFBScale;
bool Renderer::s_skipSwap;
bool Renderer::XFBWrited;
-PEControl::PixelFormat Renderer::prev_efb_format = (PEControl::PixelFormat)-1;
+PEControl::PixelFormat Renderer::prev_efb_format = PEControl::INVALID_FMT;
unsigned int Renderer::efb_scale_numeratorX = 1;
unsigned int Renderer::efb_scale_numeratorY = 1;
unsigned int Renderer::efb_scale_denominatorX = 1;
@@ -89,7 +89,7 @@ Renderer::Renderer()
Renderer::~Renderer()
{
// invalidate previous efb format
- prev_efb_format = (PEControl::PixelFormat)-1;
+ prev_efb_format = PEControl::INVALID_FMT;
efb_scale_numeratorX = efb_scale_numeratorY = efb_scale_denominatorX = efb_scale_denominatorY = 1;