mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-22 16:37:21 -06:00
Use numeric_limits instead of constants from C
In C++, using numeric_limits is more idiomatic compared to using constants.
This commit is contained in:
@@ -28,7 +28,6 @@
|
||||
|
||||
#include "random.h"
|
||||
|
||||
#include <limits>
|
||||
#include <random>
|
||||
|
||||
#include <QtGlobal>
|
||||
|
||||
@@ -30,12 +30,13 @@
|
||||
#define UTILS_RANDOM_H
|
||||
|
||||
#include <cstdint>
|
||||
#include <limits>
|
||||
|
||||
namespace Utils
|
||||
{
|
||||
namespace Random
|
||||
{
|
||||
uint32_t rand(uint32_t min = 0, uint32_t max = UINT32_MAX);
|
||||
uint32_t rand(uint32_t min = 0, uint32_t max = std::numeric_limits<uint32_t>::max());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user