Use original parseUInt function

This commit is contained in:
Tom Deakin 2016-04-29 18:38:49 +01:00
parent d557915007
commit 2cb4fe74b1

View File

@ -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[])