Changed large const string values to string ref in some assimp functions

This commit is contained in:
unknown 2019-07-20 00:53:21 +05:30
parent c317a3ce16
commit 1b4d3f7d56
2 changed files with 6 additions and 6 deletions

View file

@ -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;

View file

@ -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);