summaryrefslogtreecommitdiff
path: root/scene/resources
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2016-07-09 14:33:30 +0200
committerGitHub <noreply@github.com>2016-07-09 14:33:30 +0200
commit3a70d4a072fa170ae927e2b416861ccd395f92d2 (patch)
tree0e5a9055880d02055dcc4e00dea1c8b5d9848ba9 /scene/resources
parent0e119a91640acbc7643ff1dd1049bf12ca302d21 (diff)
parentf40f360a2c4ca8e6f2a651dbcca3ae82e2abe7a1 (diff)
Merge pull request #5589 from akien-mga/pr-unused-var
Removing some more unused vars and dead code
Diffstat (limited to 'scene/resources')
-rw-r--r--scene/resources/animation.cpp3
-rw-r--r--scene/resources/dynamic_font.cpp2
-rw-r--r--scene/resources/mesh.cpp4
-rw-r--r--scene/resources/packed_scene.cpp22
4 files changed, 3 insertions, 28 deletions
diff --git a/scene/resources/animation.cpp b/scene/resources/animation.cpp
index 098801bcf5..1d15b6f2bc 100644
--- a/scene/resources/animation.cpp
+++ b/scene/resources/animation.cpp
@@ -1997,9 +1997,6 @@ void Animation::_transform_track_optimize(int p_idx,float p_alowed_linear_err,fl
void Animation::optimize(float p_allowed_linear_err,float p_allowed_angular_err,float p_angle_max) {
-
- int total_tt=0;
-
for(int i=0;i<tracks.size();i++) {
if (tracks[i]->type==TYPE_TRANSFORM)
diff --git a/scene/resources/dynamic_font.cpp b/scene/resources/dynamic_font.cpp
index c3b40f7add..67587a8f8b 100644
--- a/scene/resources/dynamic_font.cpp
+++ b/scene/resources/dynamic_font.cpp
@@ -434,7 +434,7 @@ void DynamicFontAtSize::_update_char(CharType p_char) {
int w = slot->bitmap.width;
int h = slot->bitmap.rows;
- int p = slot->bitmap.pitch;
+ //int p = slot->bitmap.pitch;
int yofs=slot->bitmap_top;
int xofs=slot->bitmap_left;
int advance=slot->advance.x>>6;
diff --git a/scene/resources/mesh.cpp b/scene/resources/mesh.cpp
index a1a1f0a935..921466585d 100644
--- a/scene/resources/mesh.cpp
+++ b/scene/resources/mesh.cpp
@@ -30,7 +30,8 @@
#include "scene/resources/concave_polygon_shape.h"
#include "scene/resources/convex_polygon_shape.h"
#include "surface_tool.h"
-static const char*_array_name[]={
+
+static const char* _array_name[]={
"vertex_array",
"normal_array",
"tangent_array",
@@ -847,7 +848,6 @@ Ref<Mesh> Mesh::create_outline(float p_margin) const {
}
{
- int tc=0;
DVector<int>::Write ir;
DVector<int> indices =arrays[ARRAY_INDEX];
bool has_indices=false;
diff --git a/scene/resources/packed_scene.cpp b/scene/resources/packed_scene.cpp
index 4f5eed8796..c36480420b 100644
--- a/scene/resources/packed_scene.cpp
+++ b/scene/resources/packed_scene.cpp
@@ -471,7 +471,6 @@ Error SceneState::_parse_node(Node *p_owner,Node *p_node,int p_parent_idx, Map<S
}
}
#endif
- int subscene_prop_search_from=0;
// all setup, we then proceed to check all properties for the node
// and save the ones that are worth saving
@@ -479,8 +478,6 @@ Error SceneState::_parse_node(Node *p_owner,Node *p_node,int p_parent_idx, Map<S
List<PropertyInfo> plist;
p_node->get_property_list(&plist);
- bool saved_script=false;
-
for (List<PropertyInfo>::Element *E=plist.front();E;E=E->next()) {
@@ -528,23 +525,7 @@ Error SceneState::_parse_node(Node *p_owner,Node *p_node,int p_parent_idx, Map<S
break;
}
}
-#if 0
-// this workaround ended up causing problems:
-https://github.com/godotengine/godot/issues/3127
- if (saved_script && exists && p_node->get_script_instance()) {
- //if this is an overriden value by another script, save it anyway
- //as the script change will erase it
- //https://github.com/godotengine/godot/issues/2958
-
- bool valid=false;
- p_node->get_script_instance()->get_property_type(name,&valid);
- if (valid) {
- exists=false;
- isdefault=false;
- }
- }
-#endif
if (exists) {
@@ -577,9 +558,6 @@ https://github.com/godotengine/godot/issues/3127
}
}
- if (name=="script/script")
- saved_script=true;
-
NodeData::Property prop;
prop.name=_nm_get_string( name,name_map);
prop.value=_vm_get_variant( value, variant_map);