mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-14 08:24:16 +09:00
[client,sdl] fix container size empty warnings
This commit is contained in:
@@ -81,18 +81,22 @@ int SdlSelectList::run()
|
||||
else if (_list.empty())
|
||||
CurrentActiveTextInput = 0;
|
||||
else
|
||||
CurrentActiveTextInput =
|
||||
WINPR_ASSERTING_INT_CAST(ssize_t, _list.size()) - 1;
|
||||
{
|
||||
auto s = _list.size();
|
||||
CurrentActiveTextInput = WINPR_ASSERTING_INT_CAST(ssize_t, s) - 1;
|
||||
}
|
||||
break;
|
||||
case SDLK_DOWN:
|
||||
case SDLK_TAB:
|
||||
if ((CurrentActiveTextInput < 0) || _list.empty())
|
||||
CurrentActiveTextInput = 0;
|
||||
else
|
||||
{
|
||||
auto s = _list.size();
|
||||
CurrentActiveTextInput++;
|
||||
CurrentActiveTextInput =
|
||||
CurrentActiveTextInput %
|
||||
WINPR_ASSERTING_INT_CAST(ssize_t, _list.size());
|
||||
CurrentActiveTextInput =
|
||||
CurrentActiveTextInput % WINPR_ASSERTING_INT_CAST(ssize_t, s);
|
||||
}
|
||||
break;
|
||||
case SDLK_RETURN:
|
||||
case SDLK_RETURN2:
|
||||
|
||||
@@ -511,10 +511,10 @@ UINT sdlClip::ReceiveServerFormatList(CliprdrClientContext* context,
|
||||
clipboard->_current_mimetypes.push_back(s_mime_mate_copied_files);
|
||||
}
|
||||
|
||||
auto s = clipboard->_current_mimetypes.size();
|
||||
SDL_Event ev = { SDL_EVENT_CLIPBOARD_UPDATE };
|
||||
ev.clipboard.owner = true;
|
||||
ev.clipboard.num_mime_types =
|
||||
WINPR_ASSERTING_INT_CAST(Sint32, clipboard->_current_mimetypes.size());
|
||||
ev.clipboard.num_mime_types = WINPR_ASSERTING_INT_CAST(Sint32, s);
|
||||
ev.clipboard.mime_types = clipboard->_current_mimetypes.data();
|
||||
|
||||
/* TODO: Hack to identify our own updates */
|
||||
|
||||
Reference in New Issue
Block a user