Fix some issues found by cppcheck.

This commit is contained in:
bruvzg 2022-04-05 13:40:26 +03:00
parent 72407a9cfb
commit f851c4aa33
No known key found for this signature in database
GPG key ID: 7960FCF39844EC38
163 changed files with 776 additions and 767 deletions

View file

@ -2061,10 +2061,8 @@ void VisualShaderEditor::_set_node_size(int p_type, int p_node, const Vector2 &p
if (!expression_node.is_null() && text_box) {
Size2 box_size = size;
if (gn != nullptr) {
if (box_size.x < 150 * EDSCALE || box_size.y < 0) {
box_size.x = gn->get_size().x;
}
if (box_size.x < 150 * EDSCALE || box_size.y < 0) {
box_size.x = gn->get_size().x;
}
box_size.x -= text_box->get_offset(SIDE_LEFT);
box_size.x -= 28 * EDSCALE;