summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorunknown <numaanzaheerahmed@yahoo.com>2019-07-20 00:53:21 +0530
committerunknown <numaanzaheerahmed@yahoo.com>2019-07-20 00:53:21 +0530
commit1b4d3f7d56113a47225cc882bf5481589d828e83 (patch)
tree8e9c24d12dcf20081cab115a000d86ef65c1874e /modules
parentc317a3ce16a35b21d85b250a0e810526bb89db38 (diff)
Changed large const string values to string ref in some assimp functions
Diffstat (limited to 'modules')
-rw-r--r--modules/assimp/editor_scene_importer_assimp.cpp6
-rw-r--r--modules/assimp/editor_scene_importer_assimp.h6
2 files changed, 6 insertions, 6 deletions
diff --git a/modules/assimp/editor_scene_importer_assimp.cpp b/modules/assimp/editor_scene_importer_assimp.cpp
index f23c66dbcf..65fa8b6459 100644
--- a/modules/assimp/editor_scene_importer_assimp.cpp
+++ b/modules/assimp/editor_scene_importer_assimp.cpp
@@ -1718,7 +1718,7 @@ void EditorSceneImporterAssimp::_find_texture_path(const String &p_path, _Direct
}
}
-String EditorSceneImporterAssimp::_assimp_get_string(const aiString p_string) const {
+String EditorSceneImporterAssimp::_assimp_get_string(const aiString &p_string) const {
//convert an assimp String to a Godot String
String name;
name.parse_utf8(p_string.C_Str() /*,p_string.length*/);
@@ -1733,7 +1733,7 @@ String EditorSceneImporterAssimp::_assimp_get_string(const aiString p_string) co
return name;
}
-String EditorSceneImporterAssimp::_assimp_anim_string_to_string(const aiString p_string) const {
+String EditorSceneImporterAssimp::_assimp_anim_string_to_string(const aiString &p_string) const {
String name;
name.parse_utf8(p_string.C_Str() /*,p_string.length*/);
@@ -1745,7 +1745,7 @@ String EditorSceneImporterAssimp::_assimp_anim_string_to_string(const aiString p
return name;
}
-String EditorSceneImporterAssimp::_assimp_raw_string_to_string(const aiString p_string) const {
+String EditorSceneImporterAssimp::_assimp_raw_string_to_string(const aiString &p_string) const {
String name;
name.parse_utf8(p_string.C_Str() /*,p_string.length*/);
return name;
diff --git a/modules/assimp/editor_scene_importer_assimp.h b/modules/assimp/editor_scene_importer_assimp.h
index 598845236e..7a30816e3b 100644
--- a/modules/assimp/editor_scene_importer_assimp.h
+++ b/modules/assimp/editor_scene_importer_assimp.h
@@ -178,7 +178,7 @@ private:
};
const Transform _assimp_matrix_transform(const aiMatrix4x4 p_matrix);
- String _assimp_get_string(const aiString p_string) const;
+ String _assimp_get_string(const aiString &p_string) const;
Transform _get_global_assimp_node_transform(const aiNode *p_current_node);
void _calc_tangent_from_mesh(const aiMesh *ai_mesh, int i, int tri_index, int index, PoolColorArray::Write &w);
@@ -200,8 +200,8 @@ private:
Spatial *_generate_scene(const String &p_path, const aiScene *scene, const uint32_t p_flags, int p_bake_fps, const int32_t p_max_bone_weights);
- String _assimp_anim_string_to_string(const aiString p_string) const;
- String _assimp_raw_string_to_string(const aiString p_string) const;
+ String _assimp_anim_string_to_string(const aiString &p_string) const;
+ String _assimp_raw_string_to_string(const aiString &p_string) const;
float _get_fbx_fps(int32_t time_mode, const aiScene *p_scene);
template <class T>
T _interpolate_track(const Vector<float> &p_times, const Vector<T> &p_values, float p_time, AssetImportAnimation::Interpolation p_interp);