mirror of
https://github.com/KeqingMoe/argparse.git
synced 2025-07-04 15:14:39 +00:00
Use member initializer list to SizeRange ctor
This commit is contained in:
parent
bec93acaa7
commit
14abaa47d9
@ -318,11 +318,9 @@ class SizeRange {
|
|||||||
std::size_t mMax;
|
std::size_t mMax;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
SizeRange(std::size_t aMin, std::size_t aMax) {
|
SizeRange(std::size_t aMin, std::size_t aMax) : mMin(aMin), mMax(aMax) {
|
||||||
if (aMin > aMax)
|
if (aMin > aMax)
|
||||||
throw std::logic_error("Range of number of arguments is invalid");
|
throw std::logic_error("Range of number of arguments is invalid");
|
||||||
mMin = aMin;
|
|
||||||
mMax = aMax;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool contains(std::size_t value) const {
|
bool contains(std::size_t value) const {
|
||||||
|
Loading…
Reference in New Issue
Block a user