summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bin/tests/test_gdscript.cpp1
-rw-r--r--bin/tests/test_misc.cpp2
-rw-r--r--bin/tests/test_physics.cpp2
-rw-r--r--bin/tests/test_physics_2d.cpp2
-rw-r--r--core/image.cpp1
-rw-r--r--core/math/triangulate.cpp5
-rw-r--r--core/object.cpp1
-rw-r--r--core/object_type_db.cpp7
-rw-r--r--drivers/png/image_loader_png.cpp2
-rw-r--r--drivers/pulseaudio/audio_driver_pulseaudio.cpp4
-rw-r--r--drivers/unix/os_unix.cpp2
-rw-r--r--modules/gdscript/gd_editor.cpp2
-rw-r--r--modules/gdscript/gd_tokenizer.cpp4
-rw-r--r--platform/android/export/export.cpp34
-rw-r--r--platform/osx/export/export.cpp2
-rw-r--r--scene/gui/color_picker.cpp17
-rw-r--r--servers/visual/rasterizer.cpp3
-rw-r--r--tools/editor/editor_import_export.cpp2
-rw-r--r--tools/editor/editor_node.cpp2
-rw-r--r--tools/editor/io_plugins/editor_bitmask_import_plugin.cpp2
-rw-r--r--tools/editor/io_plugins/editor_sample_import_plugin.cpp2
-rw-r--r--tools/editor/io_plugins/editor_scene_import_plugin.cpp7
-rw-r--r--tools/editor/plugins/baked_light_baker.cpp4
-rw-r--r--tools/editor/plugins/shader_graph_editor_plugin.cpp9
-rw-r--r--tools/editor/spatial_editor_gizmos.cpp2
25 files changed, 60 insertions, 61 deletions
diff --git a/bin/tests/test_gdscript.cpp b/bin/tests/test_gdscript.cpp
index 4457d70b38..43d65f782b 100644
--- a/bin/tests/test_gdscript.cpp
+++ b/bin/tests/test_gdscript.cpp
@@ -222,6 +222,7 @@ static String _parser_expr(const GDParser::Node *p_expr) {
case GDParser::OperatorNode::OP_BIT_AND: { txt=_parser_expr(c_node->arguments[0])+"&"+_parser_expr(c_node->arguments[1]); } break;;
case GDParser::OperatorNode::OP_BIT_OR: { txt=_parser_expr(c_node->arguments[0])+"|"+_parser_expr(c_node->arguments[1]); } break;
case GDParser::OperatorNode::OP_BIT_XOR: { txt=_parser_expr(c_node->arguments[0])+"^"+_parser_expr(c_node->arguments[1]); } break;
+ default: {}
}
diff --git a/bin/tests/test_misc.cpp b/bin/tests/test_misc.cpp
index 68564c62b0..9d7adc3573 100644
--- a/bin/tests/test_misc.cpp
+++ b/bin/tests/test_misc.cpp
@@ -431,7 +431,7 @@ public:
RID lightaux = vs->light_create( VisualServer::LIGHT_DIRECTIONAL );
//vs->light_set_color( lightaux, VisualServer::LIGHT_COLOR_AMBIENT, Color(0.0,0.0,0.0) );
//vs->light_set_shadow( lightaux, true );
- RID light = vs->instance_create2( lightaux,scenario );
+ vs->instance_create2( lightaux,scenario );
//rot_a=Transform(Matrix3(Vector3(1,0,0),Math_PI/2.0),Vector3());
rot_b=Transform(Matrix3(),Vector3(2,0,0));
diff --git a/bin/tests/test_physics.cpp b/bin/tests/test_physics.cpp
index ecd90a13d4..f202d0dda1 100644
--- a/bin/tests/test_physics.cpp
+++ b/bin/tests/test_physics.cpp
@@ -609,7 +609,7 @@ public:
//t.basis.rotate(Vector3(-1,0,0),Math_PI/4*i);
- RID b = create_body(type,PhysicsServer::BODY_MODE_RIGID,t);
+ create_body(type,PhysicsServer::BODY_MODE_RIGID,t);
//RID b = create_body(type,i==0?PhysicsServer::BODY_MODE_STATIC:PhysicsServer::BODY_MODE_RIGID,t);
}
diff --git a/bin/tests/test_physics_2d.cpp b/bin/tests/test_physics_2d.cpp
index c5fb734999..845e20b6c3 100644
--- a/bin/tests/test_physics_2d.cpp
+++ b/bin/tests/test_physics_2d.cpp
@@ -410,7 +410,7 @@ public:
Physics2DServer::ShapeType type = types[i%4];
// type=Physics2DServer::SHAPE_SEGMENT;
- RID b = _add_body(type,Matrix32(i*0.8,Point2(152+i*40,100-40*i)));
+ _add_body(type,Matrix32(i*0.8,Point2(152+i*40,100-40*i)));
//if (i==0)
// ps->body_set_mode(b,Physics2DServer::BODY_MODE_STATIC);
}
diff --git a/core/image.cpp b/core/image.cpp
index d6ac3f28ea..90051d7d0d 100644
--- a/core/image.cpp
+++ b/core/image.cpp
@@ -2052,6 +2052,7 @@ Error Image::_decompress_bc() {
ht/=2;
} break;
+ default: {}
}
}
diff --git a/core/math/triangulate.cpp b/core/math/triangulate.cpp
index 27b7c86675..1f5d5ed6b3 100644
--- a/core/math/triangulate.cpp
+++ b/core/math/triangulate.cpp
@@ -157,7 +157,10 @@ bool Triangulate::triangulate(const Vector<Vector2> &contour,Vector<int> &result
m++;
/* remove v from remaining polygon */
- for(s=v,t=v+1;t<nv;s++,t++) V[s] = V[t]; nv--;
+ for(s=v,t=v+1;t<nv;s++,t++)
+ V[s] = V[t];
+
+ nv--;
/* resest error detection counter */
count = 2*nv;
diff --git a/core/object.cpp b/core/object.cpp
index 81fdc2a90c..8cd4e07097 100644
--- a/core/object.cpp
+++ b/core/object.cpp
@@ -1644,6 +1644,7 @@ void Object::_clear_internal_resource_paths(const Variant &p_var) {
_clear_internal_resource_paths(d[E->get()]);
}
} break;
+ default: {}
}
}
diff --git a/core/object_type_db.cpp b/core/object_type_db.cpp
index b6a69e3bd4..aa641923e6 100644
--- a/core/object_type_db.cpp
+++ b/core/object_type_db.cpp
@@ -866,21 +866,14 @@ MethodBind* ObjectTypeDB::bind_methodfi(uint32_t p_flags, MethodBind *p_bind , c
Vector<Variant> defvals;
-#define PARSE_DEFVAL(m_defval)\
-if (d##m_defval.used) defvals.insert(0,d##m_defval.val);\
-else goto set_defvals;
-
defvals.resize(p_defcount);
for(int i=0;i<p_defcount;i++) {
defvals[i]=*p_defs[p_defcount-i-1];
}
- set_defvals:
-
p_bind->set_default_arguments(defvals);
p_bind->set_hint_flags(p_flags);
-#undef PARSE_DEFVAL
return p_bind;
}
diff --git a/drivers/png/image_loader_png.cpp b/drivers/png/image_loader_png.cpp
index e10ac7493f..4967b0f9df 100644
--- a/drivers/png/image_loader_png.cpp
+++ b/drivers/png/image_loader_png.cpp
@@ -270,7 +270,7 @@ static void user_read_data(png_structp png_ptr,png_bytep data, png_size_t p_leng
PNGReadStatus *rstatus;
rstatus=(PNGReadStatus*)png_get_io_ptr(png_ptr);
- int to_read=p_length;
+ png_size_t to_read=p_length;
if (rstatus->size>=0) {
to_read = MIN( p_length, rstatus->size - rstatus->offset);
}
diff --git a/drivers/pulseaudio/audio_driver_pulseaudio.cpp b/drivers/pulseaudio/audio_driver_pulseaudio.cpp
index 4804bc5630..954d2c20f2 100644
--- a/drivers/pulseaudio/audio_driver_pulseaudio.cpp
+++ b/drivers/pulseaudio/audio_driver_pulseaudio.cpp
@@ -175,8 +175,8 @@ void AudioDriverPulseAudio::finish() {
exit_thread = true;
Thread::wait_to_finish(thread);
- if (pulse)
- pa_simple_free(pulse);
+ if (pulse)
+ pa_simple_free(pulse);
if (samples_in) {
memdelete_arr(samples_in);
diff --git a/drivers/unix/os_unix.cpp b/drivers/unix/os_unix.cpp
index fd515d6dd3..271cf302ef 100644
--- a/drivers/unix/os_unix.cpp
+++ b/drivers/unix/os_unix.cpp
@@ -390,7 +390,7 @@ Error OS_Unix::execute(const String& p_path, const List<String>& p_arguments,boo
if (p_blocking) {
int status;
- pid_t rpid = waitpid(pid,&status,0);
+ waitpid(pid,&status,0);
if (r_exitcode)
*r_exitcode=WEXITSTATUS(status);
} else {
diff --git a/modules/gdscript/gd_editor.cpp b/modules/gdscript/gd_editor.cpp
index 2a80531ec5..d02e2b92e4 100644
--- a/modules/gdscript/gd_editor.cpp
+++ b/modules/gdscript/gd_editor.cpp
@@ -2094,7 +2094,7 @@ Error GDScriptLanguage::complete_code(const String& p_code, const String& p_base
GDParser p;
- Error err = p.parse(p_code,p_base_path,false,"",true);
+ p.parse(p_code,p_base_path,false,"",true);
bool isfunction=false;
Set<String> options;
diff --git a/modules/gdscript/gd_tokenizer.cpp b/modules/gdscript/gd_tokenizer.cpp
index 072a7e26a0..2041ec12ad 100644
--- a/modules/gdscript/gd_tokenizer.cpp
+++ b/modules/gdscript/gd_tokenizer.cpp
@@ -1332,7 +1332,7 @@ StringName GDTokenizerBuffer::get_token_identifier(int p_offset) const{
ERR_FAIL_INDEX_V(offset,tokens.size(),StringName());
uint32_t identifier = tokens[offset]>>TOKEN_BITS;
- ERR_FAIL_INDEX_V(identifier,identifiers.size(),StringName());
+ ERR_FAIL_INDEX_V(identifier,(uint32_t)identifiers.size(),StringName());
return identifiers[identifier];
}
@@ -1391,7 +1391,7 @@ const Variant& GDTokenizerBuffer::get_token_constant(int p_offset) const{
int offset = token+p_offset;
ERR_FAIL_INDEX_V(offset,tokens.size(),nil);
uint32_t constant = tokens[offset]>>TOKEN_BITS;
- ERR_FAIL_INDEX_V(constant,constants.size(),nil);
+ ERR_FAIL_INDEX_V(constant,(uint32_t)constants.size(),nil);
return constants[constant];
}
diff --git a/platform/android/export/export.cpp b/platform/android/export/export.cpp
index 10d77aba6c..8f3edfcaa7 100644
--- a/platform/android/export/export.cpp
+++ b/platform/android/export/export.cpp
@@ -495,7 +495,7 @@ static String _parse_string(const uint8_t *p_bytes,bool p_utf8) {
Vector<uint8_t> str8;
str8.resize(len+1);
- for(int i=0;i<len;i++) {
+ for(uint32_t i=0;i<len;i++) {
str8[i]=p_bytes[offset+i];
}
str8[len]=0;
@@ -505,7 +505,7 @@ static String _parse_string(const uint8_t *p_bytes,bool p_utf8) {
} else {
String str;
- for(int i=0;i<len;i++) {
+ for(uint32_t i=0;i<len;i++) {
CharType c = decode_uint16(&p_bytes[offset+i*2]);
if (c==0)
break;
@@ -535,7 +535,7 @@ void EditorExportPlatformAndroid::_fix_resources(Vector<uint8_t>& p_manifest) {
printf("stirng count: %i\n",string_count);
printf("flags: %x\n",string_flags);
- for(int i=0;i<string_count;i++) {
+ for(uint32_t i=0;i<string_count;i++) {
uint32_t offset = decode_uint32(&p_manifest[string_table_begins+i*4]);
offset+=string_table_begins+string_count*4;
@@ -569,7 +569,7 @@ void EditorExportPlatformAndroid::_fix_resources(Vector<uint8_t>& p_manifest) {
Vector<uint8_t> ret;
ret.resize(string_table_begins+string_table.size()*4);
- for(int i=0;i<string_table_begins;i++) {
+ for(uint32_t i=0;i<string_table_begins;i++) {
ret[i]=p_manifest[i];
}
@@ -660,7 +660,7 @@ void EditorExportPlatformAndroid::_fix_manifest(Vector<uint8_t>& p_manifest,bool
uint32_t filesize = decode_uint32(&p_manifest[ofs+4]);
ofs+=8;
-// print_line("FILESIZE: "+itos(filesize)+" ACTUAL: "+itos(p_manifest.size()));
+ //print_line("FILESIZE: "+itos(filesize)+" ACTUAL: "+itos(p_manifest.size()));
uint32_t string_count;
uint32_t styles_count;
@@ -672,7 +672,7 @@ void EditorExportPlatformAndroid::_fix_manifest(Vector<uint8_t>& p_manifest,bool
uint32_t string_table_ends;
Vector<uint8_t> stable_extra;
- while(ofs < p_manifest.size()) {
+ while(ofs < (uint32_t)p_manifest.size()) {
uint32_t chunk = decode_uint32(&p_manifest[ofs]);
uint32_t size = decode_uint32(&p_manifest[ofs+4]);
@@ -687,7 +687,7 @@ void EditorExportPlatformAndroid::_fix_manifest(Vector<uint8_t>& p_manifest,bool
string_count=decode_uint32(&p_manifest[iofs]);
styles_count=decode_uint32(&p_manifest[iofs+4]);
- uint32_t string_flags=decode_uint32(&p_manifest[iofs+8]);
+ string_flags=decode_uint32(&p_manifest[iofs+8]);
string_data_offset=decode_uint32(&p_manifest[iofs+12]);
styles_offset=decode_uint32(&p_manifest[iofs+16]);
/*
@@ -703,7 +703,7 @@ void EditorExportPlatformAndroid::_fix_manifest(Vector<uint8_t>& p_manifest,bool
string_table_begins=st_offset;
- for(int i=0;i<string_count;i++) {
+ for(uint32_t i=0;i<string_count;i++) {
uint32_t string_at = decode_uint32(&p_manifest[st_offset+i*4]);
string_at+=st_offset+string_count*4;
@@ -719,7 +719,7 @@ void EditorExportPlatformAndroid::_fix_manifest(Vector<uint8_t>& p_manifest,bool
uint32_t len = decode_uint16(&p_manifest[string_at]);
Vector<CharType> ucstring;
ucstring.resize(len+1);
- for(int j=0;j<len;j++) {
+ for(uint32_t j=0;j<len;j++) {
uint16_t c=decode_uint16(&p_manifest[string_at+2+2*j]);
ucstring[j]=c;
}
@@ -732,7 +732,7 @@ void EditorExportPlatformAndroid::_fix_manifest(Vector<uint8_t>& p_manifest,bool
// print_line("String "+itos(i)+": "+string_table[i]);
}
- for(int i=string_end;i<(ofs+size);i++) {
+ for(uint32_t i=string_end;i<(ofs+size);i++) {
stable_extra.push_back(p_manifest[i]);
}
@@ -758,7 +758,7 @@ void EditorExportPlatformAndroid::_fix_manifest(Vector<uint8_t>& p_manifest,bool
uint32_t attrcount=decode_uint32(&p_manifest[iofs+20]);
iofs+=28;
//printf("ATTRCOUNT: %x\n",attrcount);
- for(int i=0;i<attrcount;i++) {
+ for(uint32_t i=0;i<attrcount;i++) {
uint32_t attr_nspace=decode_uint32(&p_manifest[iofs]);
uint32_t attr_name=decode_uint32(&p_manifest[iofs+4]);
uint32_t attr_value=decode_uint32(&p_manifest[iofs+8]);
@@ -883,7 +883,7 @@ void EditorExportPlatformAndroid::_fix_manifest(Vector<uint8_t>& p_manifest,bool
Vector<uint8_t> ret;
ret.resize(string_table_begins+string_table.size()*4);
- for(int i=0;i<string_table_begins;i++) {
+ for(uint32_t i=0;i<string_table_begins;i++) {
ret[i]=p_manifest[i];
}
@@ -927,7 +927,7 @@ void EditorExportPlatformAndroid::_fix_manifest(Vector<uint8_t>& p_manifest,bool
uint32_t extra = (p_manifest.size()-string_table_ends);
ret.resize(new_stable_end + extra);
- for(int i=0;i<extra;i++)
+ for(uint32_t i=0;i<extra;i++)
ret[new_stable_end+i]=p_manifest[string_table_ends+i];
while(ret.size()%4)
@@ -1355,7 +1355,7 @@ Error EditorExportPlatformAndroid::export_project(const String& p_path, bool p_d
args.push_back(unaligned_path);
args.push_back(user);
int retval;
- int err = OS::get_singleton()->execute(jarsigner,args,true,NULL,NULL,&retval);
+ OS::get_singleton()->execute(jarsigner,args,true,NULL,NULL,&retval);
if (retval) {
EditorNode::add_io_error("'jarsigner' returned with error #"+itos(retval));
return ERR_CANT_CREATE;
@@ -1368,7 +1368,7 @@ Error EditorExportPlatformAndroid::export_project(const String& p_path, bool p_d
args.push_back(unaligned_path);
args.push_back("-verbose");
- err = OS::get_singleton()->execute(jarsigner,args,true,NULL,NULL,&retval);
+ OS::get_singleton()->execute(jarsigner,args,true,NULL,NULL,&retval);
if (retval) {
EditorNode::add_io_error("'jarsigner' verification of APK failed. Make sure to use jarsigner from Java 6.");
return ERR_CANT_CREATE;
@@ -1515,7 +1515,7 @@ void EditorExportPlatformAndroid::_device_poll_thread(void *ud) {
List<String> args;
args.push_back("devices");
int ec;
- Error err = OS::get_singleton()->execute(adb,args,true,NULL,&devices,&ec);
+ OS::get_singleton()->execute(adb,args,true,NULL,&devices,&ec);
Vector<String> ds = devices.split("\n");
Vector<String> ldevices;
for(int i=1;i<ds.size();i++) {
@@ -1574,7 +1574,7 @@ void EditorExportPlatformAndroid::_device_poll_thread(void *ud) {
int ec;
String dp;
- Error err = OS::get_singleton()->execute(adb,args,true,NULL,&dp,&ec);
+ OS::get_singleton()->execute(adb,args,true,NULL,&dp,&ec);
Vector<String> props = dp.split("\n");
String vendor;
diff --git a/platform/osx/export/export.cpp b/platform/osx/export/export.cpp
index 47b0392b25..30f4c58150 100644
--- a/platform/osx/export/export.cpp
+++ b/platform/osx/export/export.cpp
@@ -445,7 +445,7 @@ Error EditorExportPlatformOSX::export_project(const String& p_path, bool p_debug
{
//write datapack
- int err = zipOpenNewFileInZip(dpkg,
+ zipOpenNewFileInZip(dpkg,
(pkg_name+".app/Contents/Resources/data.pck").utf8().get_data(),
NULL,
NULL,
diff --git a/scene/gui/color_picker.cpp b/scene/gui/color_picker.cpp
index b69646432e..5e66544153 100644
--- a/scene/gui/color_picker.cpp
+++ b/scene/gui/color_picker.cpp
@@ -41,13 +41,13 @@ void update_material(Ref<CanvasItemMaterial>mat,const Color& p_color,float h,flo
if (!sdr.is_valid())
return;
- mat->set_shader_param("R",p_color.r);
- mat->set_shader_param("G",p_color.g);
- mat->set_shader_param("B",p_color.b);
- mat->set_shader_param("H",h);
- mat->set_shader_param("S",s);
- mat->set_shader_param("V",v);
- mat->set_shader_param("A",p_color.a);
+ mat->set_shader_param("R",p_color.r);
+ mat->set_shader_param("G",p_color.g);
+ mat->set_shader_param("B",p_color.b);
+ mat->set_shader_param("H",h);
+ mat->set_shader_param("S",s);
+ mat->set_shader_param("V",v);
+ mat->set_shader_param("A",p_color.a);
}
void ColorPicker::_notification(int p_what) {
@@ -397,9 +397,10 @@ void ColorPicker::_screen_input(const InputEvent &ev)
if (!r->get_rect().has_point(Point2(mev.global_x,mev.global_y)))
return;
Image img =r->get_screen_capture();
- if (!img.empty())
+ if (!img.empty()) {
last_capture=img;
r->queue_screen_capture();
+ }
if (!last_capture.empty())
set_color(last_capture.get_pixel(mev.global_x,mev.global_y));
}
diff --git a/servers/visual/rasterizer.cpp b/servers/visual/rasterizer.cpp
index 32f5b80e55..a4b91e17fe 100644
--- a/servers/visual/rasterizer.cpp
+++ b/servers/visual/rasterizer.cpp
@@ -290,9 +290,6 @@ RID Rasterizer::_create_shader(const FixedMaterialShaderKey& p_key) {
//print_line("**VERTEX SHADER GENERATED code: \n"+vcode);
- double tf = (OS::get_singleton()->get_ticks_usec()-t)/1000.0;
-// print_line("generate: "+rtos(tf));
-
shader_set_code(fms.shader,vcode,code,lcode,0,0);
fixed_material_shaders[p_key]=fms;
diff --git a/tools/editor/editor_import_export.cpp b/tools/editor/editor_import_export.cpp
index 357d139c04..d90a175811 100644
--- a/tools/editor/editor_import_export.cpp
+++ b/tools/editor/editor_import_export.cpp
@@ -1441,7 +1441,7 @@ bool EditorExportPlatformPC::can_export(String *r_error) const {
String err;
bool valid=true;
- if (use64 && (!exists_export_template(debug_binary64)) || !exists_export_template(release_binary64)) {
+ if (use64 && (!exists_export_template(debug_binary64) || !exists_export_template(release_binary64))) {
valid=false;
err="No 64 bits export templates found.\nDownload and install export templates.\n";
}
diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp
index 11c51991e1..655652ced9 100644
--- a/tools/editor/editor_node.cpp
+++ b/tools/editor/editor_node.cpp
@@ -785,7 +785,7 @@ bool EditorNode::_find_and_save_resource(RES res,Map<RES,bool>& processed,int32_
if (changed || subchanged) {
//save
print_line("Also saving modified external resource: "+res->get_path());
- Error err = ResourceSaver::save(res->get_path(),res,flags);
+ ResourceSaver::save(res->get_path(),res,flags);
}
processed[res]=false; //because it's a file
diff --git a/tools/editor/io_plugins/editor_bitmask_import_plugin.cpp b/tools/editor/io_plugins/editor_bitmask_import_plugin.cpp
index dca7d011ff..757d2ed5d4 100644
--- a/tools/editor/io_plugins/editor_bitmask_import_plugin.cpp
+++ b/tools/editor/io_plugins/editor_bitmask_import_plugin.cpp
@@ -147,7 +147,7 @@ public:
dst = dst.plus_file(bitmasks[i].get_file().basename() + ".pbm");
- Error err = plugin->import(dst, imd);
+ plugin->import(dst, imd);
}
hide();
diff --git a/tools/editor/io_plugins/editor_sample_import_plugin.cpp b/tools/editor/io_plugins/editor_sample_import_plugin.cpp
index ac0795f522..7dc74e58dd 100644
--- a/tools/editor/io_plugins/editor_sample_import_plugin.cpp
+++ b/tools/editor/io_plugins/editor_sample_import_plugin.cpp
@@ -298,7 +298,7 @@ public:
dst = dst.plus_file(samples[i].get_file().basename()+".smp");
- Error err = plugin->import(dst,imd);
+ plugin->import(dst,imd);
}
hide();
diff --git a/tools/editor/io_plugins/editor_scene_import_plugin.cpp b/tools/editor/io_plugins/editor_scene_import_plugin.cpp
index fa62283e37..190b56faba 100644
--- a/tools/editor/io_plugins/editor_scene_import_plugin.cpp
+++ b/tools/editor/io_plugins/editor_scene_import_plugin.cpp
@@ -1447,6 +1447,7 @@ void EditorSceneImportPlugin::_find_resources(const Variant& p_var, Map<Ref<Imag
}
} break;
+ default: {}
}
@@ -2325,7 +2326,7 @@ void EditorSceneImportPlugin::_filter_tracks(Node *scene, const String& p_text)
if (!scene->has_node(String("AnimationPlayer")))
return;
- Node* n = scene->get_node(String("AnimationPlayer"));
+ Node* n = scene->get_node(String("AnimationPlayer"));
ERR_FAIL_COND(!n);
AnimationPlayer *anim = n->cast_to<AnimationPlayer>();
ERR_FAIL_COND(!anim);
@@ -2443,7 +2444,7 @@ void EditorSceneImportPlugin::_optimize_animations(Node *scene, float p_max_lin_
if (!scene->has_node(String("AnimationPlayer")))
return;
- Node* n = scene->get_node(String("AnimationPlayer"));
+ Node* n = scene->get_node(String("AnimationPlayer"));
ERR_FAIL_COND(!n);
AnimationPlayer *anim = n->cast_to<AnimationPlayer>();
ERR_FAIL_COND(!anim);
@@ -2842,7 +2843,7 @@ Error EditorSceneImportPlugin::import2(Node *scene, const String& p_dest_path, c
}
}
- Error err = EditorTextureImportPlugin::get_singleton()->import(target_path,imd);
+ EditorTextureImportPlugin::get_singleton()->import(target_path,imd);
}
}
diff --git a/tools/editor/plugins/baked_light_baker.cpp b/tools/editor/plugins/baked_light_baker.cpp
index a2e94e8855..f43bec1cd3 100644
--- a/tools/editor/plugins/baked_light_baker.cpp
+++ b/tools/editor/plugins/baked_light_baker.cpp
@@ -1177,8 +1177,6 @@ float BakedLightBaker::_throw_ray(ThreadStack& thread_stack,bool p_bake_direct,c
diffuse_at_point.g=res_light.g*diffuse_at_point.g;
diffuse_at_point.b=res_light.b*diffuse_at_point.b;
- float ret=1e6;
-
if (p_bounces>0) {
@@ -1220,7 +1218,7 @@ float BakedLightBaker::_throw_ray(ThreadStack& thread_stack,bool p_bake_direct,c
#endif
- ret=_throw_ray(thread_stack,p_bake_direct,r_point,r_point+rn*p_rest,p_rest,diffuse_at_point,p_att_curve,p_att_pos,p_att_curve_len,p_bounces-1);
+ _throw_ray(thread_stack,p_bake_direct,r_point,r_point+rn*p_rest,p_rest,diffuse_at_point,p_att_curve,p_att_pos,p_att_curve_len,p_bounces-1);
}
if (use_specular && (specular_at_point.r>CMP_EPSILON || specular_at_point.g>CMP_EPSILON || specular_at_point.b>CMP_EPSILON)) {
diff --git a/tools/editor/plugins/shader_graph_editor_plugin.cpp b/tools/editor/plugins/shader_graph_editor_plugin.cpp
index 815da48e96..aa66a2e0d9 100644
--- a/tools/editor/plugins/shader_graph_editor_plugin.cpp
+++ b/tools/editor/plugins/shader_graph_editor_plugin.cpp
@@ -901,6 +901,7 @@ void ShaderGraphView::_variant_edited() {
case Variant::COLOR:
v2=Color();
break;
+ default: {}
}
UndoRedo *ur=EditorNode::get_singleton()->get_undo_redo();
ur->create_action(TTR("Change Default Value"));
@@ -1321,6 +1322,7 @@ void ShaderGraphView::_default_changed(int p_id, Node *p_button, int p_param, in
h=PROPERTY_HINT_COLOR_NO_ALPHA;
v=Color();
break;
+ default: {}
}
ped_popup->edit(NULL,"",vt,v,h,p_hint);
@@ -1347,6 +1349,8 @@ ToolButton *ShaderGraphView::make_label(String text, Variant::Type v_type) {
break;
case Variant::COLOR:
l->set_icon(ped_popup->get_icon("Color", "EditorIcons"));
+ break;
+ default: {}
}
return l;
}
@@ -1372,7 +1376,7 @@ ToolButton *ShaderGraphView::make_editor(String text,GraphNode* gn,int p_id,int
case Variant::TRANSFORM:
edit->set_icon(ped_popup->get_icon("Matrix", "EditorIcons"));
break;
- case Variant::COLOR:
+ case Variant::COLOR: {
Image icon_color = Image(15,15,false,Image::FORMAT_RGB);
Color c = graph->default_get_value(type,p_id,param);
for (int x=1;x<14;x++)
@@ -1382,7 +1386,8 @@ ToolButton *ShaderGraphView::make_editor(String text,GraphNode* gn,int p_id,int
t.instance();
t->create_from_image(icon_color);
edit->set_icon(t);
- break;
+ } break;
+ default: {}
}
return edit;
}
diff --git a/tools/editor/spatial_editor_gizmos.cpp b/tools/editor/spatial_editor_gizmos.cpp
index 480d33fd0a..84803eb6db 100644
--- a/tools/editor/spatial_editor_gizmos.cpp
+++ b/tools/editor/spatial_editor_gizmos.cpp
@@ -422,8 +422,6 @@ bool EditorSpatialGizmo::intersect_ray(const Camera *p_camera,const Point2& p_po
if (billboard_handle) {
t.set_look_at(t.origin,t.origin+p_camera->get_transform().basis.get_axis(2),p_camera->get_transform().basis.get_axis(1));
}
- Transform ti=t.affine_inverse();
-
float min_d=1e20;
int idx=-1;