Apply clang-tidy fixes to change `static_cast` to `proto2::DownCastToGenerated` in sr_www dependencies.

As a prerequisite of enabling go/protobuf-weak-speed-messages downcasts using built-in cast operations need to be changed to cast functions recommended by protobuf team (go/protobuf-downcast-recommendation)

**More information**: go/protobuf-stripping-lsc

#codehealth

PiperOrigin-RevId: 582977861
pull/14734/head
Protobuf Team Bot 1 year ago committed by Copybara-Service
parent 001be3c655
commit 00e783d113
  1. 3
      python/google/protobuf/pyext/descriptor_database.cc

@ -16,6 +16,7 @@
#include "google/protobuf/descriptor.pb.h"
#include "absl/log/absl_log.h"
#include "google/protobuf/message.h"
#include "google/protobuf/pyext/message.h"
#include "google/protobuf/pyext/scoped_pyobject_ptr.h"
@ -54,7 +55,7 @@ static bool GetFileDescriptorProto(PyObject* py_descriptor,
message->message->GetDescriptor() == filedescriptor_descriptor) {
// Fast path: Just use the pointer.
FileDescriptorProto* file_proto =
static_cast<FileDescriptorProto*>(message->message);
google::protobuf::DownCastToGenerated<FileDescriptorProto>(message->message);
*output = *file_proto;
return true;
} else {

Loading…
Cancel
Save