summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
Diffstat (limited to 'editor')
-rw-r--r--editor/code_editor.cpp1
-rw-r--r--editor/editor_asset_installer.cpp2
-rw-r--r--editor/export_template_manager.cpp8
-rw-r--r--editor/filesystem_dock.cpp3
-rw-r--r--editor/import/editor_import_collada.cpp5
-rw-r--r--editor/plugins/particles_editor_plugin.cpp4
-rw-r--r--editor/script_create_dialog.cpp25
7 files changed, 16 insertions, 32 deletions
diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp
index c33340ce69..accf7a3fcf 100644
--- a/editor/code_editor.cpp
+++ b/editor/code_editor.cpp
@@ -258,7 +258,6 @@ void FindReplaceBar::_get_search_from(int &r_line, int &r_col) {
int selection_from_col = text_edit->get_selection_from_column();
if (r_col >= selection_from_col && r_col <= text_edit->get_selection_to_column()) {
- r_col = selection_line;
r_col = selection_from_col;
}
}
diff --git a/editor/editor_asset_installer.cpp b/editor/editor_asset_installer.cpp
index 96bfb295ea..6c05a9ef80 100644
--- a/editor/editor_asset_installer.cpp
+++ b/editor/editor_asset_installer.cpp
@@ -100,7 +100,7 @@ void EditorAssetInstaller::open(const String &p_path, int p_depth) {
//get filename
unz_file_info info;
char fname[16384];
- ret = unzGetCurrentFileInfo(pkg, &info, fname, 16384, NULL, 0, NULL, 0);
+ unzGetCurrentFileInfo(pkg, &info, fname, 16384, NULL, 0, NULL, 0);
String name = fname;
files_sorted.insert(name);
diff --git a/editor/export_template_manager.cpp b/editor/export_template_manager.cpp
index e6f15d1712..5ff9b795d7 100644
--- a/editor/export_template_manager.cpp
+++ b/editor/export_template_manager.cpp
@@ -195,7 +195,7 @@ void ExportTemplateManager::_install_from_file(const String &p_file) {
data.resize(info.uncompressed_size);
//read
- ret = unzOpenCurrentFile(pkg);
+ unzOpenCurrentFile(pkg);
ret = unzReadCurrentFile(pkg, data.ptr(), data.size());
unzCloseCurrentFile(pkg);
@@ -257,7 +257,7 @@ void ExportTemplateManager::_install_from_file(const String &p_file) {
//get filename
unz_file_info info;
char fname[16384];
- ret = unzGetCurrentFileInfo(pkg, &info, fname, 16384, NULL, 0, NULL, 0);
+ unzGetCurrentFileInfo(pkg, &info, fname, 16384, NULL, 0, NULL, 0);
String file = fname;
@@ -265,8 +265,8 @@ void ExportTemplateManager::_install_from_file(const String &p_file) {
data.resize(info.uncompressed_size);
//read
- ret = unzOpenCurrentFile(pkg);
- ret = unzReadCurrentFile(pkg, data.ptr(), data.size());
+ unzOpenCurrentFile(pkg);
+ unzReadCurrentFile(pkg, data.ptr(), data.size());
unzCloseCurrentFile(pkg);
print_line(fname);
diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp
index 8e40850a0c..7413b05aac 100644
--- a/editor/filesystem_dock.cpp
+++ b/editor/filesystem_dock.cpp
@@ -1465,10 +1465,9 @@ void FileSystemDock::_files_list_rmb_select(int p_item, const Vector2 &p_pos) {
return;
}
- EditorFileSystemDirectory *efsd = NULL;
int pos;
- efsd = EditorFileSystem::get_singleton()->find_file(path, &pos);
+ EditorFileSystemDirectory *efsd = EditorFileSystem::get_singleton()->find_file(path, &pos);
if (efsd) {
diff --git a/editor/import/editor_import_collada.cpp b/editor/import/editor_import_collada.cpp
index a75147a3a9..b3ccb5097e 100644
--- a/editor/import/editor_import_collada.cpp
+++ b/editor/import/editor_import_collada.cpp
@@ -1584,14 +1584,12 @@ Error ColladaImport::_create_resources(Collada::Node *p_node) {
apply_xform = Transform();
}
- Collada::SkinControllerData::Source *joint_src = NULL;
-
ERR_FAIL_COND_V(!skin->weights.sources.has("JOINT"), ERR_INVALID_DATA);
String joint_id = skin->weights.sources["JOINT"].source;
ERR_FAIL_COND_V(!skin->sources.has(joint_id), ERR_INVALID_DATA);
- joint_src = &skin->sources[joint_id];
+ Collada::SkinControllerData::Source *joint_src = &skin->sources[joint_id];
bone_remap.resize(joint_src->sarray.size());
@@ -2317,7 +2315,6 @@ Ref<Animation> EditorSceneImporterCollada::import_animation(const String &p_path
if (state.animations.size() == 0)
return Ref<Animation>();
Ref<Animation> anim = state.animations[0];
- anim = state.animations[0];
print_line("Anim Load OK");
String base = p_path.get_basename().to_lower();
if (p_flags & IMPORT_ANIMATION_DETECT_LOOP) {
diff --git a/editor/plugins/particles_editor_plugin.cpp b/editor/plugins/particles_editor_plugin.cpp
index d918a3e24e..1e3723a911 100644
--- a/editor/plugins/particles_editor_plugin.cpp
+++ b/editor/plugins/particles_editor_plugin.cpp
@@ -270,9 +270,7 @@ void ParticlesEditor::_generate_emission_points() {
Vector3 dir;
dir[Math::rand() % 3] = 1.0;
- Vector3 ofs = Vector3(1, 1, 1) - dir;
- ofs = (Vector3(1, 1, 1) - dir) * Vector3(Math::randf(), Math::randf(), Math::randf()) * aabb.size;
- ofs += aabb.position;
+ Vector3 ofs = (Vector3(1, 1, 1) - dir) * Vector3(Math::randf(), Math::randf(), Math::randf()) * aabb.size + aabb.position;
Vector3 ofsv = ofs + aabb.size * dir;
diff --git a/editor/script_create_dialog.cpp b/editor/script_create_dialog.cpp
index 0748c43b5f..299538a2b3 100644
--- a/editor/script_create_dialog.cpp
+++ b/editor/script_create_dialog.cpp
@@ -531,28 +531,19 @@ void ScriptCreateDialog::_bind_methods() {
ScriptCreateDialog::ScriptCreateDialog() {
- GridContainer *gc = memnew(GridContainer);
- VBoxContainer *vb = memnew(VBoxContainer);
- HBoxContainer *hb = memnew(HBoxContainer);
- Label *l = memnew(Label);
- Control *empty = memnew(Control);
- Control *empty_h = memnew(Control);
- Control *empty_v = memnew(Control);
- PanelContainer *pc = memnew(PanelContainer);
-
/* DIALOG */
/* Main Controls */
- gc = memnew(GridContainer);
+ GridContainer *gc = memnew(GridContainer);
gc->set_columns(2);
/* Error Messages Field */
- vb = memnew(VBoxContainer);
+ VBoxContainer *vb = memnew(VBoxContainer);
- hb = memnew(HBoxContainer);
- l = memnew(Label);
+ HBoxContainer *hb = memnew(HBoxContainer);
+ Label *l = memnew(Label);
l->set_text(" - ");
hb->add_child(l);
error_label = memnew(Label);
@@ -571,19 +562,19 @@ ScriptCreateDialog::ScriptCreateDialog() {
hb->add_child(path_error_label);
vb->add_child(hb);
- pc = memnew(PanelContainer);
+ PanelContainer *pc = memnew(PanelContainer);
pc->set_h_size_flags(Control::SIZE_FILL);
pc->add_style_override("panel", EditorNode::get_singleton()->get_gui_base()->get_stylebox("bg", "Tree"));
pc->add_child(vb);
/* Margins */
- empty_h = memnew(Control);
+ Control *empty_h = memnew(Control);
empty_h->set_name("empty_h"); //duplicate() doesn't like nodes without a name
empty_h->set_h_size_flags(Control::SIZE_EXPAND_FILL);
empty_h->set_v_size_flags(Control::SIZE_EXPAND_FILL);
empty_h->set_custom_minimum_size(Size2(0, 10 * EDSCALE));
- empty_v = memnew(Control);
+ Control *empty_v = memnew(Control);
empty_v->set_name("empty_v");
empty_v->set_h_size_flags(Control::SIZE_EXPAND_FILL);
empty_v->set_v_size_flags(Control::SIZE_EXPAND_FILL);
@@ -684,7 +675,7 @@ ScriptCreateDialog::ScriptCreateDialog() {
internal = memnew(CheckButton);
internal->connect("pressed", this, "_built_in_pressed");
hb = memnew(HBoxContainer);
- empty = memnew(Control);
+ Control *empty = memnew(Control);
hb->add_child(internal);
hb->add_child(empty);
l = memnew(Label);