mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-17 08:15:45 -04:00
Various warning fixes
This commit is contained in:
@ -949,7 +949,6 @@ bool CommonHostInterface::EnumerateOSDMessages(std::function<bool(const std::str
|
||||
if (m_osd_messages.empty())
|
||||
return true;
|
||||
|
||||
bool result = true;
|
||||
auto iter = m_osd_messages.begin();
|
||||
while (iter != m_osd_messages.end())
|
||||
{
|
||||
|
@ -36,11 +36,6 @@ static const ImWchar* s_font_glyph_range = nullptr;
|
||||
|
||||
static u32 s_menu_button_index = 0;
|
||||
|
||||
static ImRect PadRect(const ImRect& r, float padding)
|
||||
{
|
||||
return ImRect(ImVec2(r.Min.x + padding, r.Min.y + padding), ImVec2(r.Max.x - padding, r.Max.y - padding));
|
||||
}
|
||||
|
||||
void SetFontFilename(const char* filename)
|
||||
{
|
||||
if (filename)
|
||||
@ -330,7 +325,11 @@ static bool MenuButtonFrame(const char* str_id, bool enabled, float height, bool
|
||||
{
|
||||
ImGuiWindow* window = ImGui::GetCurrentWindow();
|
||||
if (window->SkipItems)
|
||||
{
|
||||
*visible = false;
|
||||
*hovered = false;
|
||||
return false;
|
||||
}
|
||||
|
||||
ImVec2 pos, size;
|
||||
GetMenuButtonFrameBounds(height, &pos, &size);
|
||||
@ -774,7 +773,8 @@ bool EnumChoiceButtonImpl(const char* title, const char* summary, s32* value_poi
|
||||
ChoiceDialogOptions options;
|
||||
options.reserve(count);
|
||||
for (u32 i = 0; i < count; i++)
|
||||
options.emplace_back(to_display_name_function(static_cast<s32>(i), opaque), *value_pointer == i);
|
||||
options.emplace_back(to_display_name_function(static_cast<s32>(i), opaque),
|
||||
static_cast<u32>(*value_pointer) == i);
|
||||
OpenChoiceDialog(title, false, std::move(options), [](s32 index, const std::string& title, bool checked) {
|
||||
if (index >= 0)
|
||||
s_enum_choice_button_value = index;
|
||||
@ -1063,7 +1063,6 @@ void DrawChoiceDialog()
|
||||
|
||||
bool is_open = (ImGui::GetNavInputAmount(ImGuiNavInput_Cancel, ImGuiInputReadMode_Pressed) < 1.0f);
|
||||
s32 choice = -1;
|
||||
bool choice_checked = false;
|
||||
|
||||
if (ImGui::BeginPopupModal(s_choice_dialog_title.c_str(), &is_open,
|
||||
ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove))
|
||||
|
@ -946,8 +946,6 @@ void OpenGLHostDisplay::ApplyPostProcessingChain(GLuint final_target, s32 final_
|
||||
s32 texture_height, s32 texture_view_x, s32 texture_view_y,
|
||||
s32 texture_view_width, s32 texture_view_height)
|
||||
{
|
||||
static constexpr std::array<float, 4> clear_color = {0.0f, 0.0f, 0.0f, 1.0f};
|
||||
|
||||
if (!CheckPostProcessingRenderTargets(GetWindowWidth(), GetWindowHeight()))
|
||||
{
|
||||
RenderDisplay(final_left, GetWindowHeight() - final_top - final_height, final_width, final_height, texture_handle,
|
||||
|
@ -594,7 +594,7 @@ bool SDLControllerInterface::BindControllerHatToButton(int controller_index, int
|
||||
return false;
|
||||
|
||||
// We need 4 entries per hat_number
|
||||
if (it->hat_button_mapping.size() < hat_number + 1)
|
||||
if (static_cast<int>(it->hat_button_mapping.size()) < hat_number + 1)
|
||||
it->hat_button_mapping.resize(hat_number + 1);
|
||||
|
||||
it->hat_button_mapping[hat_number][index] = std::move(callback);
|
||||
|
Reference in New Issue
Block a user