From Ulrich Hertlien, "the changes from r12126 (see below) in dae/domSourceReader.h cause compiler errors on OS X
with gcc-4.2.1: In file included from /Users/uli/Projects/osg/OpenSceneGraph/src/osgPlugins/dae/daeRAnimations.cpp:3: /Users/uli/Projects/osg/OpenSceneGraph/src/osgPlugins/dae/domSourceReader.h:43: error: explicit specialization in non-namespace scope 'class osgDAE::domSourceReader' /Users/uli/Projects/osg/OpenSceneGraph/src/osgPlugins/dae/domSourceReader.h:45: error: explicit specialization in non-namespace scope 'class osgDAE::domSourceReader' /Users/uli/Projects/osg/OpenSceneGraph/src/osgPlugins/dae/domSourceReader.h:47: error: explicit specialization in non-namespace scope 'class osgDAE::domSourceReader' /Users/uli/Projects/osg/OpenSceneGraph/src/osgPlugins/dae/domSourceReader.h:49: error: explicit specialization in non-namespace scope 'class osgDAE::domSourceReader' /Users/uli/Projects/osg/OpenSceneGraph/src/osgPlugins/dae/domSourceReader.h:51: error: explicit specialization in non-namespace scope 'class osgDAE::domSourceReader' ... The attached file fixes this."
This commit is contained in:
@@ -40,22 +40,6 @@ public:
|
||||
|
||||
template <class OsgArrayType>
|
||||
inline OsgArrayType * getArray();
|
||||
template <>
|
||||
inline osg::FloatArray* domSourceReader::getArray<osg::FloatArray>() { if (srcInit) convert(false); return m_float_array.get(); };
|
||||
template <>
|
||||
inline osg::Vec2Array* domSourceReader::getArray<osg::Vec2Array>() { if (srcInit) convert(false); return m_vec2_array.get(); };
|
||||
template <>
|
||||
inline osg::Vec3Array* domSourceReader::getArray<osg::Vec3Array>() { if (srcInit) convert(false); return m_vec3_array.get(); };
|
||||
template <>
|
||||
inline osg::Vec4Array* domSourceReader::getArray<osg::Vec4Array>() { if (srcInit) convert(false); return m_vec4_array.get(); };
|
||||
template <>
|
||||
inline osg::Vec2dArray* domSourceReader::getArray<osg::Vec2dArray>() { if (srcInit) convert(true); return m_vec2d_array.get(); };
|
||||
template <>
|
||||
inline osg::Vec3dArray* domSourceReader::getArray<osg::Vec3dArray>() { if (srcInit) convert(true); return m_vec3d_array.get(); };
|
||||
template <>
|
||||
inline osg::Vec4dArray* domSourceReader::getArray<osg::Vec4dArray>() { if (srcInit) convert(true); return m_vec4d_array.get(); };
|
||||
template <>
|
||||
inline osg::MatrixfArray* domSourceReader::getArray<osg::MatrixfArray>() { if (srcInit) convert(false); return m_matrix_array.get(); };
|
||||
|
||||
int getCount(bool enableDoublePrecision) const { if (srcInit) const_cast<domSourceReader*>(this)->convert(enableDoublePrecision); return m_count; };
|
||||
|
||||
@@ -96,9 +80,72 @@ protected:
|
||||
osg::ref_ptr<osg::Vec3dArray> m_vec3d_array;
|
||||
osg::ref_ptr<osg::Vec4dArray> m_vec4d_array;
|
||||
osg::ref_ptr<osg::MatrixfArray> m_matrix_array;
|
||||
|
||||
};
|
||||
|
||||
template <>
|
||||
inline osg::FloatArray* domSourceReader::getArray<osg::FloatArray>()
|
||||
{
|
||||
if (srcInit)
|
||||
convert(false);
|
||||
return m_float_array.get();
|
||||
}
|
||||
|
||||
template <>
|
||||
inline osg::Vec2Array* domSourceReader::getArray<osg::Vec2Array>()
|
||||
{
|
||||
if (srcInit)
|
||||
convert(false);
|
||||
return m_vec2_array.get();
|
||||
}
|
||||
|
||||
template <>
|
||||
inline osg::Vec3Array* domSourceReader::getArray<osg::Vec3Array>()
|
||||
{
|
||||
if (srcInit)
|
||||
convert(false);
|
||||
return m_vec3_array.get();
|
||||
}
|
||||
|
||||
template <>
|
||||
inline osg::Vec4Array* domSourceReader::getArray<osg::Vec4Array>()
|
||||
{
|
||||
if (srcInit)
|
||||
convert(false);
|
||||
return m_vec4_array.get();
|
||||
}
|
||||
|
||||
template <>
|
||||
inline osg::Vec2dArray* domSourceReader::getArray<osg::Vec2dArray>()
|
||||
{
|
||||
if (srcInit)
|
||||
convert(true);
|
||||
return m_vec2d_array.get();
|
||||
}
|
||||
|
||||
template <>
|
||||
inline osg::Vec3dArray* domSourceReader::getArray<osg::Vec3dArray>()
|
||||
{
|
||||
if (srcInit)
|
||||
convert(true);
|
||||
return m_vec3d_array.get();
|
||||
}
|
||||
|
||||
template <>
|
||||
inline osg::Vec4dArray* domSourceReader::getArray<osg::Vec4dArray>()
|
||||
{
|
||||
if (srcInit)
|
||||
convert(true);
|
||||
return m_vec4d_array.get();
|
||||
}
|
||||
|
||||
template <>
|
||||
inline osg::MatrixfArray* domSourceReader::getArray<osg::MatrixfArray>()
|
||||
{
|
||||
if (srcInit)
|
||||
convert(false);
|
||||
return m_matrix_array.get();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user