Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks

This commit is contained in:
Rémi Verschelde
2021-05-04 14:41:06 +02:00
parent 64a63e0861
commit b5e1e05ef2
1439 changed files with 1 additions and 34187 deletions

View File

@ -40,12 +40,10 @@ void DictionaryPropertyEdit::_notif_changev(const String &p_v) {
}
void DictionaryPropertyEdit::_set_key(const Variant &p_old_key, const Variant &p_new_key) {
// TODO: Set key of a dictionary is not allowed yet
}
void DictionaryPropertyEdit::_set_value(const Variant &p_key, const Variant &p_value) {
Dictionary dict = get_dictionary();
dict[p_key] = p_value;
Object *o = ObjectDB::get_instance(obj);
@ -56,7 +54,6 @@ void DictionaryPropertyEdit::_set_value(const Variant &p_key, const Variant &p_v
}
Variant DictionaryPropertyEdit::get_dictionary() const {
Object *o = ObjectDB::get_instance(obj);
if (!o)
return Dictionary();
@ -67,7 +64,6 @@ Variant DictionaryPropertyEdit::get_dictionary() const {
}
void DictionaryPropertyEdit::_get_property_list(List<PropertyInfo> *p_list) const {
Dictionary dict = get_dictionary();
Array keys = dict.keys();
@ -87,13 +83,11 @@ void DictionaryPropertyEdit::_get_property_list(List<PropertyInfo> *p_list) cons
}
void DictionaryPropertyEdit::edit(Object *p_obj, const StringName &p_prop) {
property = p_prop;
obj = p_obj->get_instance_id();
}
Node *DictionaryPropertyEdit::get_node() {
Object *o = ObjectDB::get_instance(obj);
if (!o)
return NULL;
@ -106,7 +100,6 @@ bool DictionaryPropertyEdit::_dont_undo_redo() {
}
void DictionaryPropertyEdit::_bind_methods() {
ClassDB::bind_method(D_METHOD("_set_key"), &DictionaryPropertyEdit::_set_key);
ClassDB::bind_method(D_METHOD("_set_value"), &DictionaryPropertyEdit::_set_value);
ClassDB::bind_method(D_METHOD("_notif_change"), &DictionaryPropertyEdit::_notif_change);
@ -115,7 +108,6 @@ void DictionaryPropertyEdit::_bind_methods() {
}
bool DictionaryPropertyEdit::_set(const StringName &p_name, const Variant &p_value) {
Dictionary dict = get_dictionary();
Array keys = dict.keys();
keys.sort();
@ -126,7 +118,6 @@ bool DictionaryPropertyEdit::_set(const StringName &p_name, const Variant &p_val
String type = pn.substr(slash + 2, pn.length());
int index = pn.substr(0, slash).to_int();
if (type == "key" && index < keys.size()) {
const Variant &key = keys[index];
UndoRedo *ur = EditorNode::get_undo_redo();
@ -141,7 +132,6 @@ bool DictionaryPropertyEdit::_set(const StringName &p_name, const Variant &p_val
} else if (type == "value" && index < keys.size()) {
const Variant &key = keys[index];
if (dict.has(key)) {
Variant value = dict[key];
UndoRedo *ur = EditorNode::get_undo_redo();
@ -161,7 +151,6 @@ bool DictionaryPropertyEdit::_set(const StringName &p_name, const Variant &p_val
}
bool DictionaryPropertyEdit::_get(const StringName &p_name, Variant &r_ret) const {
Dictionary dict = get_dictionary();
Array keys = dict.keys();
keys.sort();
@ -170,7 +159,6 @@ bool DictionaryPropertyEdit::_get(const StringName &p_name, Variant &r_ret) cons
int slash = pn.find(": ");
if (slash != -1 && pn.length() > slash) {
String type = pn.substr(slash + 2, pn.length());
int index = pn.substr(0, slash).to_int();