Skip to content

Commit

Permalink
Avoid copying type::Type and update comments for AnyPatchExtractionVi…
Browse files Browse the repository at this point in the history
…sitor

Summary: We are not pursuing splitting any more. Remove TODO comment.

Reviewed By: Mizuchi

Differential Revision: D67963820

fbshipit-source-id: d2380f70f2ed630e63b4533690e363827b05e50d
  • Loading branch information
thedavekwon authored and facebook-github-bot committed Jan 9, 2025
1 parent 5e2b91f commit 84aa5a3
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions thrift/lib/thrift/detail/AnyPatch.h
Original file line number Diff line number Diff line change
Expand Up @@ -255,9 +255,6 @@ class AnyPatch : public BaseClearPatch<Patch, AnyPatch<Patch>> {

void apply(type::AnyData& val) const { apply(val.toThrift()); }

// TODO(dokwon): Consider migrating it to be part of patch splitting when it
// is available.

/// Extracts the patch for the given patch type.
template <typename VPatch>
VPatch extractPatchAsIf() const {
Expand Down Expand Up @@ -287,7 +284,7 @@ class AnyPatch : public BaseClearPatch<Patch, AnyPatch<Patch>> {
}

VPatch patch;
const type::Type type_ = type::Type::get<VTag>();
const type::Type& type_ = type::Type::get<VTag>();
};
AnyPatchExtractionVisitor visitor;
customVisit(visitor);
Expand Down

0 comments on commit 84aa5a3

Please sign in to comment.