Skip to content

Commit 8d7dd48

Browse files
authored
Merge pull request #820 from davidgiven/protobuf
Apply the fix from #811 to make everything build against Protobuf 31.
2 parents b26735d + d1524f7 commit 8d7dd48

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

lib/config/proto.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ std::string ProtoField::get() const
439439
case google::protobuf::FieldDescriptor::TYPE_ENUM:
440440
{
441441
const auto* enumvalue = reflection->GetEnum(*_message, _field);
442-
return enumvalue->name();
442+
return (std::string)enumvalue->name();
443443
}
444444

445445
case google::protobuf::FieldDescriptor::TYPE_MESSAGE:
@@ -534,7 +534,7 @@ findAllPossibleProtoFields(const google::protobuf::Descriptor* descriptor)
534534
for (int i = 0; i < d->field_count(); i++)
535535
{
536536
const google::protobuf::FieldDescriptor* f = d->field(i);
537-
std::string n = s + f->name();
537+
std::string n = s + (std::string)f->name();
538538

539539
if (f->label() == google::protobuf::FieldDescriptor::LABEL_REPEATED)
540540
n += "[]";

scripts/mkdocindex.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ static std::string supportStatus(SupportStatus status)
1919
return "";
2020
}
2121

22-
return "";
22+
return "";
2323
}
2424

2525
int main(int argc, const char* argv[])
@@ -43,7 +43,8 @@ int main(int argc, const char* argv[])
4343
{
4444
const auto* descriptor =
4545
FilesystemProto::FilesystemType_descriptor();
46-
auto name = descriptor->FindValueByNumber(fs.type())->name();
46+
std::string name =
47+
descriptor->FindValueByNumber(fs.type())->name();
4748

4849
filesystems.insert(name);
4950
}

0 commit comments

Comments
 (0)