fix lint errors

Summary:
Changelog: [Internal][Yoga] Fixed lint errors

```arc lint --apply-patches --take CLANGFORMAT --paths-cmd 'hg files xplat/yoga'
```
Added .clang-tidy file

Reviewed By: zertosh

Differential Revision: D19948702

fbshipit-source-id: f77a16d6f2c532267597a84a9caded0aae68c3aa
This commit is contained in:
Sidharth Guglani
2020-02-18 08:09:53 -08:00
committed by Facebook Github Bot
parent a1278cee05
commit bfc3b2f86f
17 changed files with 568 additions and 554 deletions

View File

@@ -84,9 +84,7 @@ public:
return *this;
}
~ScopedGlobalRef() {
reset();
}
~ScopedGlobalRef() { reset(); }
/**
* Deletes the currently held reference and reassigns a new one to the
@@ -120,9 +118,7 @@ public:
/**
* Returns true if the underlying JNI reference is not NULL.
*/
operator bool() const {
return mGlobalRef != NULL;
}
operator bool() const { return mGlobalRef != NULL; }
ScopedGlobalRef(const ScopedGlobalRef& ref) = delete;
ScopedGlobalRef& operator=(const ScopedGlobalRef& other) = delete;

View File

@@ -83,9 +83,7 @@ public:
return *this;
}
~ScopedLocalRef() {
reset();
}
~ScopedLocalRef() { reset(); }
/**
* Deletes the currently held reference and reassigns a new one to the
@@ -119,9 +117,7 @@ public:
/**
* Returns true if the underlying JNI reference is not NULL.
*/
operator bool() const {
return mLocalRef != NULL;
}
operator bool() const { return mLocalRef != NULL; }
ScopedLocalRef(const ScopedLocalRef& ref) = delete;
ScopedLocalRef& operator=(const ScopedLocalRef& other) = delete;

View File

@@ -77,8 +77,11 @@ DEFINE_CALL_METHOD_FOR_PRIMITIVE_INTERFACE(void, Void) {
assertNoPendingJniException(env);
}
ScopedLocalRef<jobject>
callStaticObjectMethod(JNIEnv* env, jclass clazz, jmethodID methodId, ...) {
ScopedLocalRef<jobject> callStaticObjectMethod(
JNIEnv* env,
jclass clazz,
jmethodID methodId,
...) {
va_list args;
va_start(args, methodId);
jobject result = env->CallStaticObjectMethodV(clazz, methodId, args);

View File

@@ -61,8 +61,11 @@ DEFINE_CALL_METHOD_FOR_PRIMITIVE_INTERFACE(void, Void);
DEFINE_CALL_METHOD_FOR_PRIMITIVE_INTERFACE(jlong, Long);
DEFINE_CALL_METHOD_FOR_PRIMITIVE_INTERFACE(jfloat, Float);
ScopedLocalRef<jobject>
callStaticObjectMethod(JNIEnv* env, jclass clazz, jmethodID methodId, ...);
ScopedLocalRef<jobject> callStaticObjectMethod(
JNIEnv* env,
jclass clazz,
jmethodID methodId,
...);
/**
* Given a local or a global reference, this method creates a new global