Skip to content

Commit b979359

Browse files
committed
Reflection: use atoi instead of stoi
The Microsoft C++ library does not have std::stoi. Opt to use std::atoi with the C-string backing the std::string. NFC.
1 parent 2e9f13e commit b979359

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/swift/Reflection/MetadataSource.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class MetadataSource {
5656
if (natural.empty())
5757
return false;
5858

59-
result = std::stoi(natural);
59+
result = std::atoi(natural.c_str());
6060
return true;
6161
}
6262

0 commit comments

Comments
 (0)