Use std::optional instead of boost::optional

This commit is contained in:
Vladimir Golovnev (Glassez) 2021-01-02 15:45:36 +03:00
parent 08e0349ca3
commit 4429a16ca8
No known key found for this signature in database
GPG key ID: 52A2C7DEE2DFA6F7
7 changed files with 17 additions and 19 deletions

View file

@ -124,7 +124,7 @@ AddNewTorrentDialog::AddNewTorrentDialog(const BitTorrent::AddTorrentParams &inP
m_ui->checkBoxRememberLastSavePath->setChecked(rememberLastSavePath);
m_ui->contentLayoutComboBox->setCurrentIndex(
static_cast<int>(m_torrentParams.contentLayout ? *m_torrentParams.contentLayout : session->torrentContentLayout()));
static_cast<int>(m_torrentParams.contentLayout.value_or(session->torrentContentLayout())));
m_ui->sequentialCheckBox->setChecked(m_torrentParams.sequential);
m_ui->firstLastCheckBox->setChecked(m_torrentParams.firstLastPiecePriority);