Merge pull request #8653 from unknownbrackets/warnings

Warning fixes from clang
This commit is contained in:
Henrik Rydgård committed 2016-03-21 08:27:25 +01:00
commit 2a35d4b4c5
16 files changed
+24 -37

No files matched your search

+7 -7
View File
@@ -26,14 +26,14 @@
class cInterfaceEGL : public cInterfaceBase {
public:
void SwapInterval(int Interval);
void Swap();
void SetMode(u32 mode) { s_opengl_mode = mode; }
void* GetFuncAddress(const std::string& name);
void SwapInterval(int Interval) override;
void Swap() override;
void SetMode(u32 mode) override { s_opengl_mode = mode; }
void* GetFuncAddress(const std::string& name) override;
bool Create(void *window_handle, bool core, bool use565) override;
bool MakeCurrent();
bool ClearCurrent();
void Shutdown();
bool MakeCurrent() override;
bool ClearCurrent() override;
void Shutdown() override;
protected:
EGLSurface egl_surf;
+2
View File
@@ -51,7 +51,9 @@ public:
private:
u64 m_LastTime;
u64 m_StartTime;
#ifdef _WIN32
u64 m_frequency;
#endif
bool m_Running;
};
-2
View File
@@ -55,8 +55,6 @@ VulkanContext::VulkanContext(const char *app_name, int app_ver, uint32_t flags)
#endif
graphics_queue_family_index_(-1),
surface_(VK_NULL_HANDLE),
prepared(false),
use_staging_buffer_(false),
instance_(VK_NULL_HANDLE),
width(0),
height(0),
-2
View File
@@ -255,8 +255,6 @@ private:
VkQueue gfx_queue_;
VkSurfaceKHR surface_;
bool prepared;
bool use_staging_buffer_;
std::string init_error_;
std::vector<const char *> instance_layer_names;
+2 -1
View File
@@ -1034,7 +1034,8 @@ void ArmJit::CompNEON_Vh2f(MIPSOpcode op) {
}
ARMReg vs = NEONMapPrefixS(_VS, sz, 0);
DestARMReg vd = NEONMapPrefixD(_VD, outsize, MAP_DIRTY | (vd == vs ? 0 : MAP_NOINIT));
// TODO: MAP_NOINIT if they're definitely not overlapping.
DestARMReg vd = NEONMapPrefixD(_VD, outsize, MAP_DIRTY);
VCVTF32F16(vd.rd, vs);
+1 -1
View File
@@ -111,7 +111,7 @@ static bool IsReallyAClear(const TransformedVertex *transformed, int numVerts) {
if (i > 0 && transformed[i].x != transformed[i - 1].x)
return false;
} else {
if ((i & 1) && transformed[i].color0_32 != matchcolor || transformed[i].z != matchz)
if ((i & 1) && (transformed[i].color0_32 != matchcolor || transformed[i].z != matchz))
return false;
// Bottom right
if (transformed[i].y != bufH)
+1 -1
View File
@@ -63,7 +63,7 @@ bool GPU_Init(GraphicsContext *ctx, Thin3DContext *thin3d) {
#endif
break;
case GPU_DIRECTX11:
return nullptr;
return false;
#ifndef NO_VULKAN
case GPU_VULKAN:
SetGPU(new GPU_Vulkan(ctx));
-1
View File
@@ -64,7 +64,6 @@ protected:
private:
int pspBtn_;
bool replace_;
std::function<void(KeyDef)> callback_;
bool mapped_; // Prevent double registrations
};
-1
View File
@@ -44,7 +44,6 @@ protected:
private:
UI::EventReturn OnCheckBox(UI::EventParams &params);
std::vector<std::string> formattedList_;
bool anythingChanged_;
};
// TODO: Instead just hook the OnClick event on a regular checkbox.
+2 -2
View File
@@ -238,8 +238,8 @@ void DisplayLayoutScreen::CreateViews() {
Choice *center = new Choice(di->T("Center"), "", false, new AnchorLayoutParams(leftColumnWidth, WRAP_CONTENT, 10, NONE, NONE, 74));
center->OnClick.Handle(this, &DisplayLayoutScreen::OnCenter);
root_->Add(center);
PopupSliderChoiceFloat *zoomlvl_ = new PopupSliderChoiceFloat(&g_Config.fSmallDisplayZoomLevel, 1.0f, 10.0f, di->T("Zoom"), 1.0f, screenManager(), di->T("* PSP res"), new AnchorLayoutParams(leftColumnWidth, WRAP_CONTENT, 10, NONE, NONE, 134));
root_->Add(zoomlvl_);
PopupSliderChoiceFloat *zoomlvl = new PopupSliderChoiceFloat(&g_Config.fSmallDisplayZoomLevel, 1.0f, 10.0f, di->T("Zoom"), 1.0f, screenManager(), di->T("* PSP res"), new AnchorLayoutParams(leftColumnWidth, WRAP_CONTENT, 10, NONE, NONE, 134));
root_->Add(zoomlvl);
mode_->AddChoice(di->T("Move"));
mode_->AddChoice(di->T("Resize"));
mode_->SetSelection(0);
-1
View File
@@ -42,7 +42,6 @@ private:
UI::ChoiceStrip *mode_;
UI::PopupMultiChoice *zoom_;
UI::PopupMultiChoice *rotation_;
UI::PopupSliderChoiceFloat *zoomlvl_;
bool displayRotEnable_;
// Touch down state for drag to resize etc
float startX_;
-3
View File
@@ -43,9 +43,6 @@ private:
//edit the game-specific settings and restore the global settings after exiting
bool bEditThenRestore;
bool lastVertical_;
// As we load metadata in the background, we need to be able to update these after the fact.
UI::TextView *tvTitle_;
UI::TextView *tvGameSize_;
UI::CheckBox *enableReportsCheckbox_;
UI::Choice *layoutEditorChoice_;
UI::Choice *postProcChoice_;
-2
View File
@@ -127,8 +127,6 @@ private:
int stick_;
float stick_size_;
float scale_;
bool dragging_[MAX_POINTERS];
bool lastPointerDown_[MAX_POINTERS];
float centerX_;
float centerY_;
+1 -1
View File
@@ -177,7 +177,7 @@ bool WindowsVulkanContext::Init(HINSTANCE hInst, HWND hWnd, std::string *error_m
}
if (g_validate_) {
int bits = VK_DEBUG_REPORT_ERROR_BIT_EXT | VK_DEBUG_REPORT_WARNING_BIT_EXT | VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT;
g_Vulkan->InitDebugMsgCallback(Vulkan_Dbg, bits, &g_LogOptions);
g_Vulkan->InitDebugMsgCallback(&Vulkan_Dbg, bits, &g_LogOptions);
}
g_Vulkan->InitSurfaceWin32(hInst, hWnd);
g_Vulkan->InitObjects(true);
+8 -8
View File
@@ -71,12 +71,12 @@ public:
class AndroidEGLGraphicsContext : public AndroidGraphicsContext {
public:
AndroidEGLGraphicsContext() : wnd_(nullptr), gl(nullptr) {}
bool Init(ANativeWindow *wnd, int desiredBackbufferSizeX, int desiredBackbufferSizeY, int backbufferFormat, int androidVersion);
bool Init(ANativeWindow *wnd, int desiredBackbufferSizeX, int desiredBackbufferSizeY, int backbufferFormat, int androidVersion) override;
void Shutdown() override;
void SwapBuffers() override;
void SwapInterval(int interval) override {}
void Resize() {}
Thin3DContext *CreateThin3DContext() {
void Resize() override {}
Thin3DContext *CreateThin3DContext() override {
CheckGLExtensions();
return T3DCreateGLContext();
}
@@ -141,8 +141,8 @@ public:
void Shutdown() override {}
void SwapBuffers() override {}
void SwapInterval(int interval) override {}
void Resize() {}
Thin3DContext *CreateThin3DContext() {
void Resize() override {}
Thin3DContext *CreateThin3DContext() override {
CheckGLExtensions();
return T3DCreateGLContext();
}
@@ -161,7 +161,7 @@ public:
void SwapBuffers() override;
void Resize() override;
void *GetAPIContext() { return g_Vulkan; }
void *GetAPIContext() override { return g_Vulkan; }
Thin3DContext *CreateThin3DContext() override {
return T3DCreateVulkanContext(g_Vulkan);
@@ -208,7 +208,7 @@ const char *ObjTypeToString(VkDebugReportObjectTypeEXT type) {
}
}
static VkBool32 VKAPI_CALL Vulkan_Dbg(VkDebugReportFlagsEXT msgFlags, VkDebugReportObjectTypeEXT objType, uint64_t srcObject, size_t location, int32_t msgCode, const char* pLayerPrefix, const char* pMsg, void *pUserData) {
static VKAPI_ATTR VkBool32 VKAPI_CALL Vulkan_Dbg(VkDebugReportFlagsEXT msgFlags, VkDebugReportObjectTypeEXT objType, uint64_t srcObject, size_t location, int32_t msgCode, const char* pLayerPrefix, const char* pMsg, void *pUserData) {
const VulkanLogOptions *options = (const VulkanLogOptions *)pUserData;
int loglevel = ANDROID_LOG_INFO;
if (msgFlags & VK_DEBUG_REPORT_ERROR_BIT_EXT) {
@@ -266,7 +266,7 @@ bool AndroidVulkanContext::Init(ANativeWindow *wnd, int desiredBackbufferSizeX,
g_Vulkan->InitSurfaceAndroid(wnd, width, height);
if (g_validate_) {
int bits = VK_DEBUG_REPORT_ERROR_BIT_EXT | VK_DEBUG_REPORT_WARNING_BIT_EXT | VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT;
g_Vulkan->InitDebugMsgCallback(Vulkan_Dbg, bits, &g_LogOptions);
g_Vulkan->InitDebugMsgCallback(&Vulkan_Dbg, bits, &g_LogOptions);
}
g_Vulkan->InitObjects(true);
-4
View File
@@ -983,10 +983,6 @@ void Thin3DVKTexture::Finalize(int zim_flags) {
// TODO
}
static bool isPowerOf2(int n) {
return n == 1 || (n & (n - 1)) == 0;
}
Thin3DDepthStencilState *Thin3DVKContext::CreateDepthStencilState(bool depthTestEnabled, bool depthWriteEnabled, T3DComparison depthCompare) {
Thin3DVKDepthStencilState *ds = new Thin3DVKDepthStencilState();
ds->depthTestEnabled = depthTestEnabled;