From dcd1151d77cd5579bdd003a933bca86690ed4f58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Thu, 14 May 2020 11:00:19 +0200 Subject: Enforce use of bool literals instead of integers Using clang-tidy's `modernize-use-bool-literals`. https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-bool-literals.html --- editor/plugins/curve_editor_plugin.cpp | 2 +- editor/plugins/editor_preview_plugins.cpp | 4 ++-- editor/plugins/mesh_library_editor_plugin.cpp | 2 +- editor/plugins/node_3d_editor_plugin.cpp | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) (limited to 'editor/plugins') diff --git a/editor/plugins/curve_editor_plugin.cpp b/editor/plugins/curve_editor_plugin.cpp index 9b5c6bae3b..fc8eef52c0 100644 --- a/editor/plugins/curve_editor_plugin.cpp +++ b/editor/plugins/curve_editor_plugin.cpp @@ -797,7 +797,7 @@ Ref CurvePreviewGenerator::generate(const Ref &p_from, cons img_ref.instance(); Image &im = **img_ref; - im.create(thumbnail_size, thumbnail_size / 2, 0, Image::FORMAT_RGBA8); + im.create(thumbnail_size, thumbnail_size / 2, false, Image::FORMAT_RGBA8); Color bg_color(0.1, 0.1, 0.1, 1.0); for (int i = 0; i < thumbnail_size; i++) { diff --git a/editor/plugins/editor_preview_plugins.cpp b/editor/plugins/editor_preview_plugins.cpp index a8c4bddccf..2db0903f04 100644 --- a/editor/plugins/editor_preview_plugins.cpp +++ b/editor/plugins/editor_preview_plugins.cpp @@ -223,7 +223,7 @@ Ref EditorBitmapPreviewPlugin::generate(const RES &p_from, const Size Ref img; img.instance(); - img->create(bm->get_size().width, bm->get_size().height, 0, Image::FORMAT_L8, data); + img->create(bm->get_size().width, bm->get_size().height, false, Image::FORMAT_L8, data); if (img->is_compressed()) { if (img->decompress() != OK) @@ -511,7 +511,7 @@ Ref EditorScriptPreviewPlugin::generate(const RES &p_from, const Size Ref img; img.instance(); int thumbnail_size = MAX(p_size.x, p_size.y); - img->create(thumbnail_size, thumbnail_size, 0, Image::FORMAT_RGBA8); + img->create(thumbnail_size, thumbnail_size, false, Image::FORMAT_RGBA8); Color bg_color = EditorSettings::get_singleton()->get("text_editor/highlighting/background_color"); Color keyword_color = EditorSettings::get_singleton()->get("text_editor/highlighting/keyword_color"); diff --git a/editor/plugins/mesh_library_editor_plugin.cpp b/editor/plugins/mesh_library_editor_plugin.cpp index a3e3d88ae2..1ca8be528f 100644 --- a/editor/plugins/mesh_library_editor_plugin.cpp +++ b/editor/plugins/mesh_library_editor_plugin.cpp @@ -168,7 +168,7 @@ void MeshLibraryEditor::_import_scene(Node *p_scene, Ref p_library, //generate previews! - if (1) { + if (true) { Vector> meshes; Vector transforms; diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp index 69f8efa86e..1614f3f073 100644 --- a/editor/plugins/node_3d_editor_plugin.cpp +++ b/editor/plugins/node_3d_editor_plugin.cpp @@ -3885,7 +3885,7 @@ Node3DEditorViewport::Node3DEditorViewport(Node3DEditor *p_spatial_editor, Edito _edit.mode = TRANSFORM_NONE; _edit.plane = TRANSFORM_VIEW; _edit.edited_gizmo = 0; - _edit.snap = 1; + _edit.snap = true; _edit.gizmo_handle = 0; index = p_index; -- cgit v1.2.3