diff options
Diffstat (limited to 'third_party/nix/src/libexpr/names.cc')
-rw-r--r-- | third_party/nix/src/libexpr/names.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/third_party/nix/src/libexpr/names.cc b/third_party/nix/src/libexpr/names.cc index 20c326776cb7..769f9e99db29 100644 --- a/third_party/nix/src/libexpr/names.cc +++ b/third_party/nix/src/libexpr/names.cc @@ -2,6 +2,8 @@ #include <memory> +#include <absl/strings/numbers.h> + #include "util.hh" namespace nix { @@ -68,8 +70,8 @@ std::string nextComponent(std::string::const_iterator& p, static bool componentsLT(const std::string& c1, const std::string& c2) { int n1; int n2; - bool c1Num = string2Int(c1, n1); - bool c2Num = string2Int(c2, n2); + bool c1Num = absl::SimpleAtoi(c1, &n1); + bool c2Num = absl::SimpleAtoi(c2, &n2); if (c1Num && c2Num) { return n1 < n2; |