diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/image_quantize.cpp | 5 | ||||
-rw-r--r-- | core/io/marshalls.cpp | 3 | ||||
-rw-r--r-- | core/io/resource_format_xml.cpp | 2 | ||||
-rw-r--r-- | core/io/resource_loader.cpp | 1 | ||||
-rw-r--r-- | core/io/translation_loader_po.cpp | 3 | ||||
-rw-r--r-- | core/math/triangle_mesh.cpp | 14 | ||||
-rw-r--r-- | core/object.cpp | 2 | ||||
-rw-r--r-- | core/path_db.cpp | 2 | ||||
-rw-r--r-- | core/pool_allocator.cpp | 1 | ||||
-rw-r--r-- | core/ustring.cpp | 1 |
10 files changed, 1 insertions, 33 deletions
diff --git a/core/image_quantize.cpp b/core/image_quantize.cpp index b8d4658fda..f6fe7a88a0 100644 --- a/core/image_quantize.cpp +++ b/core/image_quantize.cpp @@ -59,7 +59,6 @@ int Image::MCBlock::get_longest_axis_index() const { for(int i=0;i<4;i++) { int d = max_color.color.col[i]-min_color.color.col[i]; - //printf(" ai:%i - %i\n",i,d); if (d>max_dist) { max_index=i; max_dist=d; @@ -71,13 +70,11 @@ int Image::MCBlock::get_longest_axis_index() const { int Image::MCBlock::get_longest_axis_length() const { int max_dist=-1; - int max_index=0; for(int i=0;i<4;i++) { int d = max_color.color.col[i]-min_color.color.col[i]; if (d>max_dist) { - max_index=i; max_dist=d; } } @@ -117,8 +114,6 @@ void Image::MCBlock::shrink() { void Image::quantize() { - Image::Format orig_format=format; - bool has_alpha = detect_alpha()!=ALPHA_NONE; bool quantize_fast=OS::get_singleton()->has_environment("QUANTIZE_FAST"); diff --git a/core/io/marshalls.cpp b/core/io/marshalls.cpp index 60617e1237..c9bd38c654 100644 --- a/core/io/marshalls.cpp +++ b/core/io/marshalls.cpp @@ -685,7 +685,6 @@ Error decode_variant(Variant& r_variant,const uint8_t *p_buffer, int p_len,int * if (count) { varray.resize(count); DVector<Vector2>::Write w = varray.write(); - const float *r = (const float*)buf; for(int i=0;i<(int)count;i++) { @@ -724,7 +723,6 @@ Error decode_variant(Variant& r_variant,const uint8_t *p_buffer, int p_len,int * if (count) { varray.resize(count); DVector<Vector3>::Write w = varray.write(); - const float *r = (const float*)buf; for(int i=0;i<(int)count;i++) { @@ -764,7 +762,6 @@ Error decode_variant(Variant& r_variant,const uint8_t *p_buffer, int p_len,int * if (count) { carray.resize(count); DVector<Color>::Write w = carray.write(); - const float *r = (const float*)buf; for(int i=0;i<(int)count;i++) { diff --git a/core/io/resource_format_xml.cpp b/core/io/resource_format_xml.cpp index a42a922baf..0d545b16f5 100644 --- a/core/io/resource_format_xml.cpp +++ b/core/io/resource_format_xml.cpp @@ -1862,8 +1862,6 @@ void ResourceInteractiveLoaderXML::open(FileAccess *p_f) { } int major = version.get_slicec('.',0).to_int(); - int minor = version.get_slicec('.',1).to_int(); - if (major>VERSION_MAJOR) { error=ERR_FILE_UNRECOGNIZED; diff --git a/core/io/resource_loader.cpp b/core/io/resource_loader.cpp index 1bb80e74eb..f414f85df8 100644 --- a/core/io/resource_loader.cpp +++ b/core/io/resource_loader.cpp @@ -443,7 +443,6 @@ String ResourceLoader::get_resource_type(const String &p_path) { String remapped_path = PathRemap::get_singleton()->get_remap(local_path); String extension=remapped_path.extension(); - bool found=false; for (int i=0;i<loader_count;i++) { String result = loader[i]->get_resource_type(local_path); diff --git a/core/io/translation_loader_po.cpp b/core/io/translation_loader_po.cpp index 4ddb276a27..a22c57b941 100644 --- a/core/io/translation_loader_po.cpp +++ b/core/io/translation_loader_po.cpp @@ -47,7 +47,6 @@ RES TranslationLoaderPO::load_translation(FileAccess *f, Error *r_error, const S String msg_id; String msg_str; String config; - int msg_line=0; if (r_error) *r_error=ERR_FILE_CORRUPT; @@ -97,7 +96,6 @@ RES TranslationLoaderPO::load_translation(FileAccess *f, Error *r_error, const S status=STATUS_READING_ID; msg_id=""; msg_str=""; - msg_line=line; } if (l.begins_with("msgstr")) { @@ -111,7 +109,6 @@ RES TranslationLoaderPO::load_translation(FileAccess *f, Error *r_error, const S l=l.substr(6,l.length()).strip_edges(); status=STATUS_READING_STRING; - msg_line=line; } if (l=="" || l.begins_with("#")) { diff --git a/core/math/triangle_mesh.cpp b/core/math/triangle_mesh.cpp index adb9861092..7aea32a8a0 100644 --- a/core/math/triangle_mesh.cpp +++ b/core/math/triangle_mesh.cpp @@ -195,9 +195,6 @@ Vector3 TriangleMesh::get_area_normal(const AABB& p_aabb) const { int n_count=0; Vector3 n; - //for(int i=0;i<max_depth;i++) - // stack[i]=0; - int level=0; DVector<Triangle>::Read trianglesr = triangles.read(); @@ -205,7 +202,6 @@ Vector3 TriangleMesh::get_area_normal(const AABB& p_aabb) const { DVector<BVH>::Read bvhr=bvh.read(); const Triangle *triangleptr=trianglesr.ptr(); - const Vector3 *vertexptr=verticesr.ptr(); int pos=bvh.size()-1; const BVH *bvhptr = bvhr.ptr(); @@ -301,14 +297,7 @@ bool TriangleMesh::intersect_segment(const Vector3& p_begin,const Vector3& p_end real_t d=1e10; bool inters=false; - //for(int i=0;i<max_depth;i++) - // stack[i]=0; - int level=0; - //AABB ray_aabb; - //ray_aabb.pos=p_begin; - //ray_aabb.expand_to(p_end); - DVector<Triangle>::Read trianglesr = triangles.read(); DVector<Vector3>::Read verticesr=vertices.read(); @@ -431,9 +420,6 @@ bool TriangleMesh::intersect_ray(const Vector3& p_begin,const Vector3& p_dir,Vec real_t d=1e20; bool inters=false; - //for(int i=0;i<max_depth;i++) - // stack[i]=0; - int level=0; DVector<Triangle>::Read trianglesr = triangles.read(); diff --git a/core/object.cpp b/core/object.cpp index 99d4a1f46a..dc3d531927 100644 --- a/core/object.cpp +++ b/core/object.cpp @@ -1495,7 +1495,7 @@ void Object::disconnect(const StringName& p_signal, Object *p_to_object, const S ERR_EXPLAIN("Disconnecting nonexistent signal '"+p_signal+"', slot: "+itos(target._id)+":"+target.method); ERR_FAIL(); } - int prev = p_to_object->connections.size(); + p_to_object->connections.erase(s->slot_map[target].cE); s->slot_map.erase(target); diff --git a/core/path_db.cpp b/core/path_db.cpp index 7545088978..0956c4cd3f 100644 --- a/core/path_db.cpp +++ b/core/path_db.cpp @@ -329,7 +329,6 @@ NodePath::NodePath(const String& p_path) { Vector<StringName> subpath; int absolute=(path[0]=='/')?1:0;; - bool valid=false; bool last_is_slash=true; int slices=0; int subpath_pos=path.find(":"); @@ -373,7 +372,6 @@ NodePath::NodePath(const String& p_path) { if (last_is_slash) slices++; - valid=true; last_is_slash=false; } } diff --git a/core/pool_allocator.cpp b/core/pool_allocator.cpp index 849fd75f50..9f5fcf5f50 100644 --- a/core/pool_allocator.cpp +++ b/core/pool_allocator.cpp @@ -372,7 +372,6 @@ Error PoolAllocator::resize(ID p_mem,int p_new_size) { } //p_new_size = align(p_new_size) - int _total = pool_size; // - static_area_size; int _free = free_mem; // - static_area_size; if ((_free + aligned(e->len)) - alloc_size < 0) { diff --git a/core/ustring.cpp b/core/ustring.cpp index 3c22de35f1..6788ada1bb 100644 --- a/core/ustring.cpp +++ b/core/ustring.cpp @@ -3836,7 +3836,6 @@ String String::lpad(int min_length, const String& character) const { String String::sprintf(const Array& values, bool* error) const { String formatted; CharType* self = (CharType*)c_str(); - int num_items = values.size(); bool in_format = false; int value_index = 0; int min_chars; |