You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-14 13:41:12 +00:00
Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks
Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
This commit is contained in:
@@ -42,7 +42,6 @@ static HashMap<String, JNISingleton *> jni_singletons;
|
||||
extern "C" {
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_godotengine_godot_plugin_GodotPlugin_nativeRegisterSingleton(JNIEnv *env, jobject obj, jstring name) {
|
||||
|
||||
String singname = jstring_to_string(name, env);
|
||||
JNISingleton *s = (JNISingleton *)ClassDB::instance("JNISingleton");
|
||||
s->set_instance(env->NewGlobalRef(obj));
|
||||
@@ -53,7 +52,6 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_plugin_GodotPlugin_nativeRegis
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_godotengine_godot_plugin_GodotPlugin_nativeRegisterMethod(JNIEnv *env, jobject obj, jstring sname, jstring name, jstring ret, jobjectArray args) {
|
||||
|
||||
String singname = jstring_to_string(sname, env);
|
||||
|
||||
ERR_FAIL_COND(!jni_singletons.has(singname));
|
||||
@@ -68,7 +66,6 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_plugin_GodotPlugin_nativeRegis
|
||||
int stringCount = env->GetArrayLength(args);
|
||||
|
||||
for (int i = 0; i < stringCount; i++) {
|
||||
|
||||
jstring string = (jstring)env->GetObjectArrayElement(args, i);
|
||||
const String rawString = jstring_to_string(string, env);
|
||||
types.push_back(get_jni_type(rawString));
|
||||
@@ -80,7 +77,6 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_plugin_GodotPlugin_nativeRegis
|
||||
jclass cls = env->GetObjectClass(s->get_instance());
|
||||
jmethodID mid = env->GetMethodID(cls, mname.ascii().get_data(), cs.ascii().get_data());
|
||||
if (!mid) {
|
||||
|
||||
print_line("Failed getting method ID " + mname);
|
||||
}
|
||||
|
||||
@@ -100,7 +96,6 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_plugin_GodotPlugin_nativeRegis
|
||||
int stringCount = env->GetArrayLength(j_signal_param_types);
|
||||
|
||||
for (int i = 0; i < stringCount; i++) {
|
||||
|
||||
jstring j_signal_param_type = (jstring)env->GetObjectArrayElement(j_signal_param_types, i);
|
||||
const String signal_param_type = jstring_to_string(j_signal_param_type, env);
|
||||
types.push_back(get_jni_type(signal_param_type));
|
||||
@@ -122,7 +117,6 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_plugin_GodotPlugin_nativeEmitS
|
||||
const Variant *args[count];
|
||||
|
||||
for (int i = 0; i < count; i++) {
|
||||
|
||||
jobject j_param = env->GetObjectArrayElement(j_signal_params, i);
|
||||
Variant variant = _jobject_to_variant(env, j_param);
|
||||
args[i] = &variant;
|
||||
|
||||
Reference in New Issue
Block a user