diff --git a/ortools/base/strtoint.cc b/ortools/base/strtoint.cc index 498746837a..9aa1d6e8be 100644 --- a/ortools/base/strtoint.cc +++ b/ortools/base/strtoint.cc @@ -18,17 +18,18 @@ #include #include "absl/strings/numbers.h" +#include "absl/strings/string_view.h" #include "ortools/base/logging.h" namespace operations_research { -int32_t strtoint32(const std::string& word) { +int32_t strtoint32(absl::string_view word) { int result; CHECK(absl::SimpleAtoi(word, &result)); return result; } -int64_t strtoint64(const std::string& word) { +int64_t strtoint64(absl::string_view word) { int64_t result; CHECK(absl::SimpleAtoi(word, &result)); return result; diff --git a/ortools/base/strtoint.h b/ortools/base/strtoint.h index 9f64d39f87..64fff677a9 100644 --- a/ortools/base/strtoint.h +++ b/ortools/base/strtoint.h @@ -45,12 +45,13 @@ #include #include "absl/base/port.h" // disable some warnings on Windows +#include "absl/strings/string_view.h" #include "ortools/base/integral_types.h" namespace operations_research { -int32_t strtoint32(const std::string& word); -int64_t strtoint64(const std::string& word); +int32_t strtoint32(absl::string_view word); +int64_t strtoint64(absl::string_view word); // Convenience versions of the above that take a string argument. inline int32_t atoi32(const std::string& word) { return strtoint32(word); } diff --git a/ortools/graph/connected_components.h b/ortools/graph/connected_components.h index 898a1f16ef..a8bcc512db 100644 --- a/ortools/graph/connected_components.h +++ b/ortools/graph/connected_components.h @@ -51,7 +51,6 @@ #include "absl/meta/type_traits.h" #include "ortools/base/logging.h" #include "ortools/base/map_util.h" -#include "ortools/base/ptr_util.h" namespace util { // Generic version of GetConnectedComponents() (see below) that supports other