Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks
This commit is contained in:
@ -37,7 +37,6 @@
|
||||
#include "progress_dialog.h"
|
||||
|
||||
void EditorAssetInstaller::_update_subitems(TreeItem *p_item, bool p_check, bool p_first) {
|
||||
|
||||
if (p_check) {
|
||||
if (p_item->get_custom_color(0) == Color()) {
|
||||
p_item->set_checked(0, true);
|
||||
@ -77,7 +76,6 @@ void EditorAssetInstaller::_uncheck_parent(TreeItem *p_item) {
|
||||
}
|
||||
|
||||
void EditorAssetInstaller::_item_edited() {
|
||||
|
||||
if (updating)
|
||||
return;
|
||||
|
||||
@ -104,7 +102,6 @@ void EditorAssetInstaller::_item_edited() {
|
||||
}
|
||||
|
||||
void EditorAssetInstaller::open(const String &p_path, int p_depth) {
|
||||
|
||||
package_path = p_path;
|
||||
Set<String> files_sorted;
|
||||
|
||||
@ -113,7 +110,6 @@ void EditorAssetInstaller::open(const String &p_path, int p_depth) {
|
||||
|
||||
unzFile pkg = unzOpen2(p_path.utf8().get_data(), &io);
|
||||
if (!pkg) {
|
||||
|
||||
error->set_text(TTR("Error opening package file, not in ZIP format."));
|
||||
return;
|
||||
}
|
||||
@ -121,7 +117,6 @@ void EditorAssetInstaller::open(const String &p_path, int p_depth) {
|
||||
int ret = unzGoToFirstFile(pkg);
|
||||
|
||||
while (ret == UNZ_OK) {
|
||||
|
||||
//get filename
|
||||
unz_file_info info;
|
||||
char fname[16384];
|
||||
@ -160,7 +155,6 @@ void EditorAssetInstaller::open(const String &p_path, int p_depth) {
|
||||
Map<String, TreeItem *> dir_map;
|
||||
|
||||
for (Set<String>::Element *E = files_sorted.front(); E; E = E->next()) {
|
||||
|
||||
String path = E->get();
|
||||
int depth = p_depth;
|
||||
bool skip = false;
|
||||
@ -234,13 +228,11 @@ void EditorAssetInstaller::open(const String &p_path, int p_depth) {
|
||||
}
|
||||
|
||||
void EditorAssetInstaller::ok_pressed() {
|
||||
|
||||
FileAccess *src_f = NULL;
|
||||
zlib_filefunc_def io = zipio_create_io_from_file(&src_f);
|
||||
|
||||
unzFile pkg = unzOpen2(package_path.utf8().get_data(), &io);
|
||||
if (!pkg) {
|
||||
|
||||
error->set_text(TTR("Error opening package file, not in ZIP format."));
|
||||
return;
|
||||
}
|
||||
@ -253,7 +245,6 @@ void EditorAssetInstaller::ok_pressed() {
|
||||
|
||||
int idx = 0;
|
||||
while (ret == UNZ_OK) {
|
||||
|
||||
//get filename
|
||||
unz_file_info info;
|
||||
char fname[16384];
|
||||
@ -262,7 +253,6 @@ void EditorAssetInstaller::ok_pressed() {
|
||||
String name = fname;
|
||||
|
||||
if (status_map.has(name) && status_map[name]->is_checked(0)) {
|
||||
|
||||
String path = status_map[name]->get_metadata(0);
|
||||
if (path == String()) { // a dir
|
||||
|
||||
@ -282,7 +272,6 @@ void EditorAssetInstaller::ok_pressed() {
|
||||
memdelete(da);
|
||||
|
||||
} else {
|
||||
|
||||
Vector<uint8_t> data;
|
||||
data.resize(info.uncompressed_size);
|
||||
|
||||
@ -313,7 +302,6 @@ void EditorAssetInstaller::ok_pressed() {
|
||||
if (failed_files.size()) {
|
||||
String msg = TTR("The following files failed extraction from package:") + "\n\n";
|
||||
for (int i = 0; i < failed_files.size(); i++) {
|
||||
|
||||
if (i > 15) {
|
||||
msg += "\n" + vformat(TTR("And %s more files."), itos(failed_files.size() - i));
|
||||
break;
|
||||
@ -330,12 +318,10 @@ void EditorAssetInstaller::ok_pressed() {
|
||||
}
|
||||
|
||||
void EditorAssetInstaller::_bind_methods() {
|
||||
|
||||
ClassDB::bind_method("_item_edited", &EditorAssetInstaller::_item_edited);
|
||||
}
|
||||
|
||||
EditorAssetInstaller::EditorAssetInstaller() {
|
||||
|
||||
VBoxContainer *vb = memnew(VBoxContainer);
|
||||
add_child(vb);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user