Skip to content

Commit

Permalink
Fix C++ 20 compilation warning.
Browse files Browse the repository at this point in the history
Without this, I see:
implicit capture of 'this' with a capture default of '=' is deprecated [-Wdeprecated-this-capture]

PiperOrigin-RevId: 695445366
  • Loading branch information
jwhpryor authored and copybara-github committed Nov 11, 2024
1 parent 3bbc4f6 commit 6f8e29e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion implementation/class_loader_ref.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class ClassLoaderRef : public ClassLoaderImpl<lifecycleType> {
if constexpr (ParentLoaderForClass<class_loader_v_, class_v>() !=
kDefaultClassLoader) {
ClassRef_t<JniT<jobject, class_v, class_loader_v_, jvm_v_,
0>>::PrimeJClassFromClassLoader([=]() {
0>>::PrimeJClassFromClassLoader([&]() {
// Prevent the object (which is a runtime instance of a class) from
// falling out of scope so it is not released.
LocalObject loaded_class =
Expand Down

0 comments on commit 6f8e29e

Please sign in to comment.