From 5c2bd47fd81a306ea2699ef7f5ee59a3cb33f16f Mon Sep 17 00:00:00 2001 From: Sergio Martins Date: Mon, 26 Dec 2016 12:43:45 +0000 Subject: [PATCH] Avoid unneeded copy-ctor calls when calling getAiType Specially for aiString, which does a memcpy. Found with clazy static analyzer. --- include/assimp/metadata.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/assimp/metadata.h b/include/assimp/metadata.h index 78b214581..b63cd6692 100644 --- a/include/assimp/metadata.h +++ b/include/assimp/metadata.h @@ -98,8 +98,8 @@ inline aiMetadataType GetAiType( int32_t ) { return AI_INT32; } inline aiMetadataType GetAiType( uint64_t ) { return AI_UINT64; } inline aiMetadataType GetAiType( float ) { return AI_FLOAT; } inline aiMetadataType GetAiType( double ) { return AI_DOUBLE; } -inline aiMetadataType GetAiType( aiString ) { return AI_AISTRING; } -inline aiMetadataType GetAiType( aiVector3D ) { return AI_AIVECTOR3D; } +inline aiMetadataType GetAiType( const aiString & ) { return AI_AISTRING; } +inline aiMetadataType GetAiType( const aiVector3D & ) { return AI_AIVECTOR3D; } #endif // __cplusplus