Skip to content

Commit

Permalink
Apply clang-format 18
Browse files Browse the repository at this point in the history
Summary: Previously this code conformed from clang-format 12.

Reviewed By: igorsugak

Differential Revision: D56065247

fbshipit-source-id: f5a985dd8f8b84f2f9e1818b3719b43c5a1b05b3
  • Loading branch information
zertosh authored and facebook-github-bot committed Apr 14, 2024
1 parent cd6e61a commit 968e381
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
7 changes: 4 additions & 3 deletions cxx/fbjni/detail/References-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -506,9 +506,10 @@ enable_if_t<IsPlainJniReference<JniType<T>>(), alias_ref<T>> static_ref_cast(
}

template <typename T, typename RefType>
auto dynamic_ref_cast(const RefType& ref) -> enable_if_t<
IsPlainJniReference<JniType<T>>(),
decltype(static_ref_cast<T>(ref))> {
auto dynamic_ref_cast(const RefType& ref)
-> enable_if_t<
IsPlainJniReference<JniType<T>>(),
decltype(static_ref_cast<T>(ref))> {
if (!ref) {
return decltype(static_ref_cast<T>(ref))();
}
Expand Down
7 changes: 4 additions & 3 deletions cxx/fbjni/detail/References.h
Original file line number Diff line number Diff line change
Expand Up @@ -673,9 +673,10 @@ enable_if_t<IsPlainJniReference<JniType<T>>(), alias_ref<T>> static_ref_cast(
const alias_ref<U>& ref) noexcept;

template <typename T, typename RefType>
auto dynamic_ref_cast(const RefType& ref) -> enable_if_t<
IsPlainJniReference<JniType<T>>(),
decltype(static_ref_cast<T>(ref))>;
auto dynamic_ref_cast(const RefType& ref)
-> enable_if_t<
IsPlainJniReference<JniType<T>>(),
decltype(static_ref_cast<T>(ref))>;

} // namespace jni
} // namespace facebook
Expand Down
2 changes: 1 addition & 1 deletion cxx/fbjni/detail/Registration-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ struct MethodWrapper {
JNI_ENTRY_POINT static typename Converter<R>::jniType
call(JNIEnv* env, jobject obj, typename Converter<Args>::jniType... args) {
return FunctionWrapper<
R (*)(alias_ref<jhybrid>, Args && ...),
R (*)(alias_ref<jhybrid>, Args&&...),
jhybrid,
R,
Args...>::call(env, obj, args..., dispatch);
Expand Down

0 comments on commit 968e381

Please sign in to comment.