Merge pull request #51611 from AnilBK/fix-duplicates

[cppcheck] Fix  Duplicate Conditions
This commit is contained in:
Rémi Verschelde 2021-08-13 10:06:09 +02:00 committed by GitHub
commit 2a40a58182
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 6 deletions

View File

@ -341,10 +341,7 @@ Error ResourceImporterLayeredTexture::import(const String &p_source_file, const
if (compress_mode == COMPRESS_VRAM_COMPRESSED) { if (compress_mode == COMPRESS_VRAM_COMPRESSED) {
mipmaps = true; mipmaps = true;
}
//optimize
if (compress_mode == COMPRESS_VRAM_COMPRESSED) {
//if using video ram, optimize //if using video ram, optimize
if (channel_pack == 0) { if (channel_pack == 0) {
//remove alpha if not needed, so compression is more efficient //remove alpha if not needed, so compression is more efficient

View File

@ -2899,9 +2899,8 @@ void VisualScriptEditor::_graph_connected(const String &p_from, int p_from_slot,
if (!converted) { if (!converted) {
undo_redo->add_do_method(script.ptr(), "data_connect", p_from.to_int(), from_port, p_to.to_int(), to_port); undo_redo->add_do_method(script.ptr(), "data_connect", p_from.to_int(), from_port, p_to.to_int(), to_port);
undo_redo->add_undo_method(script.ptr(), "data_disconnect", p_from.to_int(), from_port, p_to.to_int(), to_port); undo_redo->add_undo_method(script.ptr(), "data_disconnect", p_from.to_int(), from_port, p_to.to_int(), to_port);
}
// Update nodes in graph // Update nodes in graph
if (!converted) {
undo_redo->add_do_method(this, "_update_graph", p_from.to_int()); undo_redo->add_do_method(this, "_update_graph", p_from.to_int());
undo_redo->add_do_method(this, "_update_graph", p_to.to_int()); undo_redo->add_do_method(this, "_update_graph", p_to.to_int());
undo_redo->add_undo_method(this, "_update_graph", p_from.to_int()); undo_redo->add_undo_method(this, "_update_graph", p_from.to_int());