Skip to content

Commit 17438c1

Browse files
pybind11_protobuf authorscopybara-github
pybind11_protobuf authors
authored andcommitted
Use DescriptorDatabase overridden virtual methods to use StringViewArg alias.
PiperOrigin-RevId: 754926003
1 parent f02a2b7 commit 17438c1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pybind11_protobuf/proto_cast_util.cc

+3-3
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ class PythonDescriptorPoolWrapper {
355355
// the Python DescriptorPool.
356356

357357
// Find a file by file name.
358-
bool FindFileByName(const std::string& filename,
358+
bool FindFileByName(StringViewArg filename,
359359
FileDescriptorProto* output) override {
360360
try {
361361
auto file = pool_.attr("FindFileByName")(filename);
@@ -371,7 +371,7 @@ class PythonDescriptorPoolWrapper {
371371
}
372372

373373
// Find the file that declares the given fully-qualified symbol name.
374-
bool FindFileContainingSymbol(const std::string& symbol_name,
374+
bool FindFileContainingSymbol(StringViewArg symbol_name,
375375
FileDescriptorProto* output) override {
376376
try {
377377
auto file = pool_.attr("FindFileContainingSymbol")(symbol_name);
@@ -389,7 +389,7 @@ class PythonDescriptorPoolWrapper {
389389

390390
// Find the file which defines an extension extending the given message type
391391
// with the given field number.
392-
bool FindFileContainingExtension(const std::string& containing_type,
392+
bool FindFileContainingExtension(StringViewArg containing_type,
393393
int field_number,
394394
FileDescriptorProto* output) override {
395395
try {

0 commit comments

Comments
 (0)