mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Use empty instead of size
This commit is contained in:
@ -200,7 +200,7 @@ void IOWindow::OnDetectButtonPressed()
|
||||
{
|
||||
const auto list = m_option_list->findItems(expr, Qt::MatchFixedString);
|
||||
|
||||
if (list.size() > 0)
|
||||
if (!list.empty())
|
||||
m_option_list->setCurrentItem(list[0]);
|
||||
}
|
||||
|
||||
|
@ -223,7 +223,7 @@ void BreakpointWidget::Update()
|
||||
|
||||
void BreakpointWidget::OnDelete()
|
||||
{
|
||||
if (m_table->selectedItems().size() == 0)
|
||||
if (m_table->selectedItems().empty())
|
||||
return;
|
||||
|
||||
auto address = m_table->selectedItems()[0]->data(Qt::UserRole).toUInt();
|
||||
|
@ -232,7 +232,7 @@ void WatchWidget::ShowContextMenu()
|
||||
{
|
||||
QMenu* menu = new QMenu(this);
|
||||
|
||||
if (m_table->selectedItems().size())
|
||||
if (!m_table->selectedItems().empty())
|
||||
{
|
||||
auto row_variant = m_table->selectedItems()[0]->data(Qt::UserRole);
|
||||
|
||||
|
@ -423,7 +423,7 @@ void FIFOAnalyzer::FindPrevious()
|
||||
|
||||
void FIFOAnalyzer::ShowSearchResult(size_t index)
|
||||
{
|
||||
if (!m_search_results.size())
|
||||
if (m_search_results.empty())
|
||||
return;
|
||||
|
||||
if (index > m_search_results.size())
|
||||
|
@ -449,7 +449,7 @@ void GameList::CompressISO(bool decompress)
|
||||
auto files = GetSelectedGames();
|
||||
const auto game = GetSelectedGame();
|
||||
|
||||
if (files.size() == 0 || !game)
|
||||
if (files.empty() || !game)
|
||||
return;
|
||||
|
||||
bool wii_warning_given = false;
|
||||
|
@ -1417,7 +1417,7 @@ void MainWindow::dropEvent(QDropEvent* event)
|
||||
else
|
||||
{
|
||||
Settings& settings = Settings::Instance();
|
||||
const bool show_confirm = settings.GetPaths().size() != 0;
|
||||
const bool show_confirm = !settings.GetPaths().empty();
|
||||
|
||||
for (const QString& folder : folders)
|
||||
{
|
||||
|
@ -265,7 +265,7 @@ void NetPlaySetupDialog::accept()
|
||||
else
|
||||
{
|
||||
auto items = m_host_games->selectedItems();
|
||||
if (items.size() == 0)
|
||||
if (items.empty())
|
||||
{
|
||||
QMessageBox::critical(this, tr("Error"), tr("You must select a game to host!"));
|
||||
return;
|
||||
|
Reference in New Issue
Block a user