Merge pull request #8694 from howard0su/cleanup_switch
Cleanup warnings of -Wswitch
This commit is contained in:
commit
d11a83e205
|
@ -1108,6 +1108,8 @@ GCMemcardExportFileRetVal GCMemcard::ExportGci(u8 index, const std::string& file
|
||||||
return GCMemcardExportFileRetVal::FAIL;
|
return GCMemcardExportFileRetVal::FAIL;
|
||||||
case GCMemcardGetSaveDataRetVal::NOMEMCARD:
|
case GCMemcardGetSaveDataRetVal::NOMEMCARD:
|
||||||
return GCMemcardExportFileRetVal::NOMEMCARD;
|
return GCMemcardExportFileRetVal::NOMEMCARD;
|
||||||
|
case GCMemcardGetSaveDataRetVal::SUCCESS:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
gci.Seek(DENTRY_SIZE + offset, SEEK_SET);
|
gci.Seek(DENTRY_SIZE + offset, SEEK_SET);
|
||||||
for (unsigned int i = 0; i < size; ++i)
|
for (unsigned int i = 0; i < size; ++i)
|
||||||
|
|
|
@ -38,9 +38,9 @@ int CSIDevice_GCSteeringWheel::RunBuffer(u8* buffer, int request_length)
|
||||||
std::memcpy(buffer, &id, sizeof(id));
|
std::memcpy(buffer, &id, sizeof(id));
|
||||||
return sizeof(id);
|
return sizeof(id);
|
||||||
}
|
}
|
||||||
}
|
default:
|
||||||
|
|
||||||
return CSIDevice_GCController::RunBuffer(buffer, request_length);
|
return CSIDevice_GCController::RunBuffer(buffer, request_length);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CSIDevice_GCSteeringWheel::GetData(u32& hi, u32& low)
|
bool CSIDevice_GCSteeringWheel::GetData(u32& hi, u32& low)
|
||||||
|
|
|
@ -747,6 +747,7 @@ void GameList::OpenGCSaveFolder()
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case ExpansionInterface::EXIDEVICE_MEMORYCARD:
|
case ExpansionInterface::EXIDEVICE_MEMORYCARD:
|
||||||
|
{
|
||||||
std::string memcard_path = i == 0 ? Config::Get(Config::MAIN_MEMCARD_A_PATH) :
|
std::string memcard_path = i == 0 ? Config::Get(Config::MAIN_MEMCARD_A_PATH) :
|
||||||
Config::Get(Config::MAIN_MEMCARD_B_PATH);
|
Config::Get(Config::MAIN_MEMCARD_B_PATH);
|
||||||
|
|
||||||
|
@ -756,6 +757,9 @@ void GameList::OpenGCSaveFolder()
|
||||||
url = QUrl::fromLocalFile(QString::fromStdString(memcard_dir));
|
url = QUrl::fromLocalFile(QString::fromStdString(memcard_dir));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
found |= !url.isEmpty();
|
found |= !url.isEmpty();
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,8 @@
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <string_view>
|
#include <string_view>
|
||||||
|
|
||||||
|
#include "Common/Logging/Log.h"
|
||||||
|
|
||||||
#include "VideoCommon/FramebufferManager.h"
|
#include "VideoCommon/FramebufferManager.h"
|
||||||
#include "VideoCommon/TextureDecoder.h"
|
#include "VideoCommon/TextureDecoder.h"
|
||||||
#include "VideoCommon/VertexShaderGen.h"
|
#include "VideoCommon/VertexShaderGen.h"
|
||||||
|
@ -570,6 +572,15 @@ std::string GenerateTextureReinterpretShader(TextureFormat from_format, TextureF
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case TextureFormat::I4:
|
||||||
|
{
|
||||||
|
ss << " float4 temp_value = ";
|
||||||
|
EmitTextureLoad(ss, 0, "coords");
|
||||||
|
ss << ";\n"
|
||||||
|
" raw_value = uint(temp_value.r * 15.0);\n";
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
case TextureFormat::IA4:
|
case TextureFormat::IA4:
|
||||||
{
|
{
|
||||||
ss << " float4 temp_value = ";
|
ss << " float4 temp_value = ";
|
||||||
|
@ -605,6 +616,10 @@ std::string GenerateTextureReinterpretShader(TextureFormat from_format, TextureF
|
||||||
" }\n";
|
" }\n";
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
WARN_LOG(VIDEO, "From format %u is not supported", static_cast<u32>(from_format));
|
||||||
|
return "{}\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Now convert it to its new representation.
|
// Now convert it to its new representation.
|
||||||
|
@ -654,6 +669,9 @@ std::string GenerateTextureReinterpretShader(TextureFormat from_format, TextureF
|
||||||
" }\n";
|
" }\n";
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
WARN_LOG(VIDEO, "To format %u is not supported", static_cast<u32>(to_format));
|
||||||
|
return "{}\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
ss << "}\n";
|
ss << "}\n";
|
||||||
|
|
Loading…
Reference in New Issue