std::string -> absl::string_view
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "ortools/base/logging.h"
|
||||
#include "ortools/base/mathutil.h"
|
||||
#include "ortools/base/stl_util.h"
|
||||
@@ -42,7 +43,7 @@ namespace operations_research {
|
||||
namespace fz {
|
||||
// Whether the given list of annotations contains the given identifier
|
||||
// (or function call).
|
||||
bool ContainsId(std::vector<Annotation>* annotations, const std::string& id) {
|
||||
bool ContainsId(std::vector<Annotation>* annotations, absl::string_view id) {
|
||||
if (annotations != nullptr) {
|
||||
for (int i = 0; i < annotations->size(); ++i) {
|
||||
if (((*annotations)[i].type == Annotation::IDENTIFIER ||
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
#include "absl/strings/str_cat.h"
|
||||
#include "absl/strings/str_format.h"
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "ortools/base/commandlineflags.h"
|
||||
#include "ortools/base/logging.h"
|
||||
#include "ortools/base/strong_vector.h"
|
||||
@@ -3701,7 +3702,7 @@ void RevisedSimplex::DisplayErrors() {
|
||||
namespace {
|
||||
|
||||
std::string StringifyMonomialWithFlags(const Fractional a,
|
||||
const std::string& x) {
|
||||
absl::string_view x) {
|
||||
return StringifyMonomial(
|
||||
a, x, absl::GetFlag(FLAGS_simplex_display_numbers_as_fractions));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user