From cec1c48a7e7bb9bdc2c6829fba9e269a97d1c8bc Mon Sep 17 00:00:00 2001 From: Johan Manuel Date: Mon, 25 Jul 2016 19:12:13 +0200 Subject: [PATCH 1/5] Fix various warnings The warnings fixed were about things like unused variables, misleading indentation, missing default cases in switches and better grouping of conditions in if statements. --- tools/editor/editor_import_export.cpp | 2 +- tools/editor/editor_node.cpp | 2 +- tools/editor/io_plugins/editor_bitmask_import_plugin.cpp | 2 +- tools/editor/io_plugins/editor_sample_import_plugin.cpp | 2 +- tools/editor/io_plugins/editor_scene_import_plugin.cpp | 7 ++++--- tools/editor/plugins/baked_light_baker.cpp | 4 +--- tools/editor/plugins/shader_graph_editor_plugin.cpp | 9 +++++++-- tools/editor/spatial_editor_gizmos.cpp | 2 -- 8 files changed, 16 insertions(+), 14 deletions(-) diff --git a/tools/editor/editor_import_export.cpp b/tools/editor/editor_import_export.cpp index 357d139c040..d90a1758113 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 30b89cacc5a..b3de3aab1d6 100644 --- a/tools/editor/editor_node.cpp +++ b/tools/editor/editor_node.cpp @@ -784,7 +784,7 @@ bool EditorNode::_find_and_save_resource(RES res,Map& 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 dca7d011ff0..757d2ed5d46 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 ac0795f522d..7dc74e58dd0 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 fa62283e37e..190b56faba1 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, Maphas_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(); 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(); 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 6a88ba4cbe8..4e442f5b9f6 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 375220051c5..a59867dd08d 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 480d33fd0aa..84803eb6dbd 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; From 8c0a050d49fdc7d922f6b854f0a11ae4bdf1462e Mon Sep 17 00:00:00 2001 From: Johan Manuel Date: Tue, 26 Jul 2016 15:02:55 +0200 Subject: [PATCH 2/5] Fix some warnings about unhandled switch cases --- bin/tests/test_gdscript.cpp | 1 + core/image.cpp | 1 + core/object.cpp | 1 + 3 files changed, 3 insertions(+) diff --git a/bin/tests/test_gdscript.cpp b/bin/tests/test_gdscript.cpp index 4457d70b38b..43d65f782b7 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/core/image.cpp b/core/image.cpp index d6ac3f28eaf..90051d7d0d4 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/object.cpp b/core/object.cpp index dc3d5319279..f42c42ebf23 100644 --- a/core/object.cpp +++ b/core/object.cpp @@ -1581,6 +1581,7 @@ void Object::_clear_internal_resource_paths(const Variant &p_var) { _clear_internal_resource_paths(d[E->get()]); } } break; + default: {} } } From 046f94d3acc9d4f6465fe05ae8ee3fbd315b23d2 Mon Sep 17 00:00:00 2001 From: Johan Manuel Date: Tue, 26 Jul 2016 15:04:16 +0200 Subject: [PATCH 3/5] Remove some unused variables --- bin/tests/test_misc.cpp | 2 +- bin/tests/test_physics.cpp | 2 +- bin/tests/test_physics_2d.cpp | 2 +- core/object_type_db.cpp | 7 ------- drivers/unix/os_unix.cpp | 2 +- modules/gdscript/gd_editor.cpp | 2 +- platform/android/export/export.cpp | 12 ++++++------ platform/osx/export/export.cpp | 2 +- servers/visual/rasterizer.cpp | 3 --- 9 files changed, 12 insertions(+), 22 deletions(-) diff --git a/bin/tests/test_misc.cpp b/bin/tests/test_misc.cpp index 68564c62b05..9d7adc35731 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 ecd90a13d46..f202d0dda1b 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 c5fb7349998..845e20b6c38 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/object_type_db.cpp b/core/object_type_db.cpp index 4998263961c..8c73d3b9af4 100644 --- a/core/object_type_db.cpp +++ b/core/object_type_db.cpp @@ -849,21 +849,14 @@ MethodBind* ObjectTypeDB::bind_methodfi(uint32_t p_flags, MethodBind *p_bind , c Vector 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;iset_default_arguments(defvals); p_bind->set_hint_flags(p_flags); -#undef PARSE_DEFVAL return p_bind; } diff --git a/drivers/unix/os_unix.cpp b/drivers/unix/os_unix.cpp index fd515d6dd30..271cf302ef2 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& 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 520a8b18d86..0af5897b418 100644 --- a/modules/gdscript/gd_editor.cpp +++ b/modules/gdscript/gd_editor.cpp @@ -2067,7 +2067,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 options; diff --git a/platform/android/export/export.cpp b/platform/android/export/export.cpp index 10d77aba6cc..a8456ac4efa 100644 --- a/platform/android/export/export.cpp +++ b/platform/android/export/export.cpp @@ -660,7 +660,7 @@ void EditorExportPlatformAndroid::_fix_manifest(Vector& 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; @@ -687,7 +687,7 @@ void EditorExportPlatformAndroid::_fix_manifest(Vector& 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]); /* @@ -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 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 ds = devices.split("\n"); Vector ldevices; for(int i=1;iexecute(adb,args,true,NULL,&dp,&ec); + OS::get_singleton()->execute(adb,args,true,NULL,&dp,&ec); Vector props = dp.split("\n"); String vendor; diff --git a/platform/osx/export/export.cpp b/platform/osx/export/export.cpp index 47b0392b255..30f4c58150a 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/servers/visual/rasterizer.cpp b/servers/visual/rasterizer.cpp index 32f5b80e55d..a4b91e17fee 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; From 67b29e3b9ea9630b84477a4bdc71b41b25191872 Mon Sep 17 00:00:00 2001 From: Johan Manuel Date: Tue, 26 Jul 2016 15:04:54 +0200 Subject: [PATCH 4/5] Fix some warnings about misleading indentation --- core/math/triangulate.cpp | 5 ++++- drivers/pulseaudio/audio_driver_pulseaudio.cpp | 4 ++-- modules/gdscript/gd_script.h | 4 ++-- scene/gui/color_picker.cpp | 17 +++++++++-------- 4 files changed, 17 insertions(+), 13 deletions(-) diff --git a/core/math/triangulate.cpp b/core/math/triangulate.cpp index 27b7c866756..1f5d5ed6b34 100644 --- a/core/math/triangulate.cpp +++ b/core/math/triangulate.cpp @@ -157,7 +157,10 @@ bool Triangulate::triangulate(const Vector &contour,Vector &result m++; /* remove v from remaining polygon */ - for(s=v,t=v+1;t debug_get_current_stack_info() { - if (Thread::get_main_ID()!=Thread::get_caller_ID()) - return Vector(); + if (Thread::get_main_ID()!=Thread::get_caller_ID()) + return Vector(); Vector csi; csi.resize(_debug_call_stack_pos); diff --git a/scene/gui/color_picker.cpp b/scene/gui/color_picker.cpp index b69646432e6..5e665441536 100644 --- a/scene/gui/color_picker.cpp +++ b/scene/gui/color_picker.cpp @@ -41,13 +41,13 @@ void update_material(Refmat,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)); } From a4674bda47ddeed7cc929bafdcd89b6bd156ee30 Mon Sep 17 00:00:00 2001 From: Johan Manuel Date: Tue, 26 Jul 2016 15:05:30 +0200 Subject: [PATCH 5/5] Fix some comparisons between signed and unsigned integers --- drivers/png/image_loader_png.cpp | 2 +- modules/gdscript/gd_tokenizer.cpp | 4 ++-- platform/android/export/export.cpp | 22 +++++++++++----------- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/png/image_loader_png.cpp b/drivers/png/image_loader_png.cpp index e10ac7493fe..4967b0f9dfb 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/modules/gdscript/gd_tokenizer.cpp b/modules/gdscript/gd_tokenizer.cpp index 93863c4eb21..ccdeef19ccf 100644 --- a/modules/gdscript/gd_tokenizer.cpp +++ b/modules/gdscript/gd_tokenizer.cpp @@ -1322,7 +1322,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]; } @@ -1381,7 +1381,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 a8456ac4efa..8f3edfcaa75 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 str8; str8.resize(len+1); - for(int i=0;i& p_manifest) { printf("stirng count: %i\n",string_count); printf("flags: %x\n",string_flags); - for(int i=0;i& p_manifest) { Vector ret; ret.resize(string_table_begins+string_table.size()*4); - for(int i=0;i& p_manifest,bool uint32_t string_table_ends; Vector 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]); @@ -703,7 +703,7 @@ void EditorExportPlatformAndroid::_fix_manifest(Vector& p_manifest,bool string_table_begins=st_offset; - for(int i=0;i& p_manifest,bool uint32_t len = decode_uint16(&p_manifest[string_at]); Vector ucstring; ucstring.resize(len+1); - for(int j=0;j& 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& p_manifest,bool uint32_t attrcount=decode_uint32(&p_manifest[iofs+20]); iofs+=28; //printf("ATTRCOUNT: %x\n",attrcount); - for(int i=0;i& p_manifest,bool Vector ret; ret.resize(string_table_begins+string_table.size()*4); - for(int i=0;i& p_manifest,bool uint32_t extra = (p_manifest.size()-string_table_ends); ret.resize(new_stable_end + extra); - for(int i=0;i