small code update/sync
This commit is contained in:
@@ -18,17 +18,18 @@
|
||||
#include <string>
|
||||
|
||||
#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;
|
||||
|
||||
@@ -45,12 +45,13 @@
|
||||
#include <string>
|
||||
|
||||
#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); }
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user