From 70574b6f7f1a28579819ecbb31800f97ad2e9a01 Mon Sep 17 00:00:00 2001 From: cignoni Date: Fri, 10 Jun 2005 15:05:00 +0000 Subject: [PATCH] Made inline PlyType specializations --- wrap/io_trimesh/import_ply.h | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/wrap/io_trimesh/import_ply.h b/wrap/io_trimesh/import_ply.h index 7f5d8619..52a2986b 100644 --- a/wrap/io_trimesh/import_ply.h +++ b/wrap/io_trimesh/import_ply.h @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.14 2005/04/14 15:09:38 ponchio +New gcc 3.3.3 (with bugs and features) now compiles. + Revision 1.13 2005/03/18 00:14:39 cignoni removed small gcc compiling issues @@ -85,11 +88,15 @@ namespace io { template int PlyType () { return 0;} -template <> int PlyType () { return ply::T_FLOAT; } -template <> int PlyType () { return ply::T_DOUBLE; } -template <> int PlyType () { return ply::T_INT; } -template <> int PlyType () { return ply::T_SHORT; } -template <> int PlyType () { return ply::T_UCHAR; } + +// 10/6/05 Cignoni this specialization must be inlined becouse otherwise if we include this +// .h in two different cpp we should get a double definition error during linking + +template <> inline int PlyType () { return ply::T_FLOAT; } +template <> inline int PlyType () { return ply::T_DOUBLE; } +template <> inline int PlyType () { return ply::T_INT; } +template <> inline int PlyType () { return ply::T_SHORT; } +template <> inline int PlyType () { return ply::T_UCHAR; } /** This class encapsulate a filter for opening ply meshes.