java: Fix string_view wrap in PropagationBaseObject::set_name

note: in python the method is ignored
note2: our bazel do not constraint solver in java
This commit is contained in:
Corentin Le Molgat
2024-01-08 18:02:13 +01:00
parent 62a56248e4
commit 4d1e60d531
3 changed files with 3 additions and 2 deletions

View File

@@ -20,6 +20,7 @@
%include "typemaps.i"
%include "stdint.i"
%include "std_string.i"
%include "std_string_view.i"
// Don't break on ABSL_DEPRECATED macro.
%define ABSL_DEPRECATED(msg)

View File

@@ -2496,7 +2496,7 @@ std::string PropagationBaseObject::name() const {
return solver_->GetName(this);
}
void PropagationBaseObject::set_name(absl::string_view name) {
void PropagationBaseObject::set_name(std::string_view name) {
solver_->SetName(this, name);
}

View File

@@ -3380,7 +3380,7 @@ class PropagationBaseObject : public BaseObject {
/// Object naming.
virtual std::string name() const;
void set_name(absl::string_view name);
void set_name(std::string_view name);
/// Returns whether the object has been named or not.
bool HasName() const;
/// Returns a base name for automatic naming.