Merge pull request #820 from davidgiven/protobuf

Apply the fix from #811 to make everything build against Protobuf 31.
This commit is contained in:
David Given
2025-08-19 23:43:26 +02:00
committed by GitHub
2 changed files with 5 additions and 4 deletions

View File

@@ -439,7 +439,7 @@ std::string ProtoField::get() const
case google::protobuf::FieldDescriptor::TYPE_ENUM:
{
const auto* enumvalue = reflection->GetEnum(*_message, _field);
return enumvalue->name();
return (std::string)enumvalue->name();
}
case google::protobuf::FieldDescriptor::TYPE_MESSAGE:
@@ -534,7 +534,7 @@ findAllPossibleProtoFields(const google::protobuf::Descriptor* descriptor)
for (int i = 0; i < d->field_count(); i++)
{
const google::protobuf::FieldDescriptor* f = d->field(i);
std::string n = s + f->name();
std::string n = s + (std::string)f->name();
if (f->label() == google::protobuf::FieldDescriptor::LABEL_REPEATED)
n += "[]";

View File

@@ -19,7 +19,7 @@ static std::string supportStatus(SupportStatus status)
return "";
}
return "";
return "";
}
int main(int argc, const char* argv[])
@@ -43,7 +43,8 @@ int main(int argc, const char* argv[])
{
const auto* descriptor =
FilesystemProto::FilesystemType_descriptor();
auto name = descriptor->FindValueByNumber(fs.type())->name();
std::string name =
descriptor->FindValueByNumber(fs.type())->name();
filesystems.insert(name);
}