protocol/ArgParser: use std::numeric_limits
Using unsigned(-1) renders undefined behavior.
This commit is contained in:
parent
9231f420c1
commit
ee61dfe087
@ -22,8 +22,6 @@
|
||||
#include "Result.hxx"
|
||||
#include "Chrono.hxx"
|
||||
|
||||
#include <limits>
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
bool
|
||||
|
@ -22,6 +22,8 @@
|
||||
|
||||
#include "check.h"
|
||||
|
||||
#include <limits>
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
class Client;
|
||||
@ -39,7 +41,7 @@ struct RangeArg {
|
||||
|
||||
void SetAll() {
|
||||
start = 0;
|
||||
end = unsigned(-1);
|
||||
end = std::numeric_limits<unsigned>::max();
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user