Fix further build issues
This commit is contained in:
parent
a41b37afe2
commit
51d14cefa1
2 changed files with 14 additions and 2 deletions
15
util.cpp
15
util.cpp
|
@ -197,9 +197,20 @@ Property make_property(PropertyType type, std::string name, PropertyId id, std::
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
Property make_property(PropertyType type, std::string name, std::string path, std::optional<PropertyHint> hint) {
|
Property make_property(PropertyType type, std::string name, std::string path, std::optional<PropertyHint> hint) {
|
||||||
return make_property(type, name, PropertyId::BackendSpecific, path, hint)
|
return make_property(type, name, PropertyId::BackendSpecific, path, hint);
|
||||||
}
|
}
|
||||||
Property make_property(PropertyType type, std::string name, PropertyId id, std::optional<PropertyHint> hint) {
|
Property make_property(PropertyType type, std::string name, PropertyId id, std::optional<PropertyHint> hint) {
|
||||||
return make_property(type, name, id, {}, hint)
|
return make_property(type, name, id, {}, hint);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
PropertyHint make_hint(std::optional<double> min = {}, std::optional<double> max = {}) {
|
||||||
|
PropertyHint output;
|
||||||
|
PropertyHintRange &range = *output.mutable_range();
|
||||||
|
if (min.has_value()) {
|
||||||
|
range.set_min(min.value());
|
||||||
|
}
|
||||||
|
if (max.has_value()) {
|
||||||
|
range.set_max(max.value());
|
||||||
|
}
|
||||||
|
return output;
|
||||||
|
}
|
||||||
|
|
1
util.hpp
1
util.hpp
|
@ -555,6 +555,7 @@ inline google::protobuf::Any value_to_any<std::string>(std::string value) {
|
||||||
output.set_value(value);
|
output.set_value(value);
|
||||||
return value_to_any<StringProperty>(output);
|
return value_to_any<StringProperty>(output);
|
||||||
}
|
}
|
||||||
|
PropertyHint make_hint(double min, double max);
|
||||||
Property make_property(PropertyType type, std::string name, PropertyId id, std::optional<PropertyHint> hint);
|
Property make_property(PropertyType type, std::string name, PropertyId id, std::optional<PropertyHint> hint);
|
||||||
Property make_property(PropertyType type, std::string name, std::string path, std::optional<PropertyHint> hint = {});
|
Property make_property(PropertyType type, std::string name, std::string path, std::optional<PropertyHint> hint = {});
|
||||||
Property make_property(PropertyType type, std::string name, PropertyId id = PropertyId::BackendSpecific, std::optional<std::string> path = {}, std::optional<PropertyHint> hint = {});
|
Property make_property(PropertyType type, std::string name, PropertyId id = PropertyId::BackendSpecific, std::optional<std::string> path = {}, std::optional<PropertyHint> hint = {});
|
||||||
|
|
Loading…
Reference in a new issue