Use original parseUInt function
This commit is contained in:
parent
d557915007
commit
2cb4fe74b1
@ -7,7 +7,7 @@
|
|||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include <string>
|
#include <cstring>
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "Stream.h"
|
#include "Stream.h"
|
||||||
@ -194,9 +194,9 @@ void check_solution(const unsigned int ntimes, std::vector<T>& a, std::vector<T>
|
|||||||
|
|
||||||
int parseUInt(const char *str, unsigned int *output)
|
int parseUInt(const char *str, unsigned int *output)
|
||||||
{
|
{
|
||||||
std::size_t next;
|
char *next;
|
||||||
*output = std::stoul(str, &next);
|
*output = strtoul(str, &next, 10);
|
||||||
return !next;
|
return !strlen(next);
|
||||||
}
|
}
|
||||||
|
|
||||||
void parseArguments(int argc, char *argv[])
|
void parseArguments(int argc, char *argv[])
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user