mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-31 12:00:16 -07:00
Replace min, max, clamp functions with std counterparts
This commit is contained in:
parent
3ea4c66d41
commit
63043b4927
7 changed files with 36 additions and 28 deletions
|
@ -28,6 +28,8 @@
|
|||
|
||||
#include "addnewtorrentdialog.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include <QDebug>
|
||||
#include <QDir>
|
||||
#include <QFileDialog>
|
||||
|
@ -231,7 +233,7 @@ int AddNewTorrentDialog::savePathHistoryLength()
|
|||
{
|
||||
const int defaultHistoryLength = 8;
|
||||
const int value = settings()->loadValue(KEY_SAVEPATHHISTORYLENGTH, defaultHistoryLength);
|
||||
return qBound(minPathHistoryLength, value, maxPathHistoryLength);
|
||||
return std::clamp(value, minPathHistoryLength, maxPathHistoryLength);
|
||||
}
|
||||
|
||||
void AddNewTorrentDialog::setSavePathHistoryLength(const int value)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue