From 7013c12a0d8d52f90c7118cc262b1d0f732844ba Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 26 Mar 2007 13:00:29 +0000 Subject: [PATCH] From Mike Wittman, "This is another weirdo change to support code generation. It brings all the Drawable::supports and Drawable::accepts overloads into the ShapeDrawable scope to avoid errors invoking the ones that are not defined in ShapeDrawable. Currently you'll get compilation errors if you pass a Drawable::AttributeFunctor or PrimitiveIndexFunctor to the "accept" function invoked on a ShapeDrawable pointer or reference, since those overloads are only defined in the base class. You'll also get the same error passing a PrimitiveIndexFunctor to the "supports" function. These errors occur because C++ function overload resolution does not cross inheritance boundaries." --- include/osg/ShapeDrawable | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/osg/ShapeDrawable b/include/osg/ShapeDrawable index 24266b207..e99f59bb9 100644 --- a/include/osg/ShapeDrawable +++ b/include/osg/ShapeDrawable @@ -162,6 +162,11 @@ class OSG_EXPORT ShapeDrawable : public Drawable */ virtual void drawImplementation(State& state) const; + /* Not all virtual overloads of these methods are overridden in this class, so + bring the base class implementation in to avoid hiding the non-used ones. */ + using Drawable::supports; + using Drawable::accept; + /** Return false, osg::ShapeDrawable does not support accept(AttributeFunctor&).*/ virtual bool supports(const AttributeFunctor&) const { return false; }