File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -267,10 +267,10 @@ int main(void) {
267
267
auto const threads_str = std::getenv (" NBODY_THREADS" );
268
268
269
269
// Parse env vars and validate
270
- std::size_t n = std::stoull (n_str ? n_str : " 0" );
271
- std::size_t const iterations = std::stoull (iterations_str ? iterations_str : " 1000" );
270
+ std::size_t n = std::strtoull (n_str ? n_str : " 0" , nullptr , 10 );
271
+ std::size_t const iterations = std::strtoull (iterations_str ? iterations_str : " 1000" , nullptr , 10 );
272
272
std::string_view const backend = backend_str ? backend_str : " fork_union_static" ;
273
- std::size_t threads = std::stoull (threads_str ? threads_str : " 0" );
273
+ std::size_t threads = std::strtoull (threads_str ? threads_str : " 0" , nullptr , 10 );
274
274
if (threads == 0 ) threads = std::thread::hardware_concurrency ();
275
275
if (n == 0 ) n = threads;
276
276
You can’t perform that action at this time.
0 commit comments