summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/patches/0005-assimp-Avoid-unneeded-copy-ctor-calls-when-calling-getAiType.patch
blob: df716b0650d3c7c06705f1427d9f2f414d3ea89c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
From 2794f2041c8c7616c91e443ea74564e4a5d07a2e Mon Sep 17 00:00:00 2001
From: Sergio Martins <sergio.martins@kdab.com>
Date: Sun, 29 Jan 2017 17:37:53 +0000
Subject: [PATCH] Avoid unneeded copy-ctor calls when calling getAiType

Specially for aiString, which does a memcpy.
Patch already committed upstream.

Change-Id: I9497e4fcc11a60a4bf434fcac4b76f1467867186
---
 src/3rdparty/assimp/include/assimp/metadata.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/3rdparty/assimp/include/assimp/metadata.h b/src/3rdparty/assimp/include/assimp/metadata.h
index 16809a511..db2f1873f 100644
--- a/src/3rdparty/assimp/include/assimp/metadata.h
+++ b/src/3rdparty/assimp/include/assimp/metadata.h
@@ -106,8 +106,8 @@ inline aiMetadataType GetAiType( bool ) { return AI_BOOL; }
 inline aiMetadataType GetAiType( int ) { return AI_INT; }
 inline aiMetadataType GetAiType( uint64_t ) { return AI_UINT64; }
 inline aiMetadataType GetAiType( float ) { return AI_FLOAT; }
-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; }
 
 
 
-- 
2.11.0