Skip to content

Commit

Permalink
Remove unused internal::DownCast (#19372)
Browse files Browse the repository at this point in the history
Fixes #19364

Closes #19372

COPYBARA_INTEGRATE_REVIEW=#19372 from Tradias:remove-downcast f126025
FUTURE_COPYBARA_INTEGRATE_REVIEW=#19372 from Tradias:remove-downcast f126025
PiperOrigin-RevId: 700053807
  • Loading branch information
Tradias authored and copybara-github committed Nov 25, 2024
1 parent 2ad21af commit 43b7807
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 8 deletions.
1 change: 0 additions & 1 deletion src/google/protobuf/extension_set_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ extern bool fully_verify_message_sets_opt_out;

namespace {

using ::google::protobuf::internal::DownCast;
using TestUtil::EqualsToSerialized;

// This test closely mirrors google/protobuf/compiler/cpp/unittest.cc
Expand Down
1 change: 0 additions & 1 deletion src/google/protobuf/map_test.inc
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,6 @@ struct MapTestPeer {
};

namespace {
using internal::DownCast;

// Map API Test =====================================================

Expand Down
5 changes: 0 additions & 5 deletions src/google/protobuf/message_lite.h
Original file line number Diff line number Diff line change
Expand Up @@ -1200,11 +1200,6 @@ T* OnShutdownDelete(T* p) {
return p;
}

inline void AssertDownCast(const MessageLite& from, const MessageLite& to) {
ABSL_DCHECK(TypeId::Get(from) == TypeId::Get(to))
<< "Cannot downcast " << from.GetTypeName() << " to " << to.GetTypeName();
}

template <bool test_call, typename MessageLite>
PROTOBUF_ALWAYS_INLINE MessageLite* MessageCreator::PlacementNew(
const MessageLite* prototype_for_func,
Expand Down
1 change: 0 additions & 1 deletion src/google/protobuf/repeated_field_reflection_unittest.inc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ namespace protobuf {
namespace {


using internal::DownCast;
using UNITTEST::ForeignMessage;
using UNITTEST::TestAllExtensions;
using UNITTEST::TestAllTypes;
Expand Down

0 comments on commit 43b7807

Please sign in to comment.