[vtk-developers] pb cvs committing a fix

Jeff Baumes jeff.baumes at kitware.com
Thu Sep 6 09:33:34 EDT 2007


The one in vtkSQLiteQuery should be a SafeDownCast.  In
vtkConvertSelection, I am downcasting to vtkDataArrayTemplate<> and
there is no SafeDownCast defined for that class.  Since the cast is
always safe, and I am not using the fact that it will be set to NULL
if the cast is invalid, I should be able to safely change it to
static_cast.  I've made these changes and added the required include
for Borland.

I was able to commit these originally because I committed from
ParaView (which includes VTK), which has different commit rules.  We
are currently working to get the commit rules the same.

Jeff

On 9/5/07, David Cole <david.cole at kitware.com> wrote:
> That's a very good question. Sounds like maybe there's a bug in the
> commit-check script when a brand new file is added, but then it gets caught
> when a subsequent commit occurs...?
>
> Jeff, can you replace these dynamic_cast occurrences with SafeDownCast usage
> instead? Or is it necessary to rethink this policy and discontinue support
> for platforms that do not have dynamic_cast enabled by default...?
>
>
> Thanks,
> David Cole
>
>
>
> On 9/5/07, Dean Inglis <dean.inglis at sympatico.ca> wrote:
> > Hi,
> >
> > I was trying to head off a red dashboard(s)
> > for Borland with vtkConvertSelection.cxx
> > by adding a missing include:
> > #include <vtksys/stl/iterator>
> > but when I went to cvs commit the change
> > I get
> >
> ==========================================================
> > vtkConvertSelection.cxx uses dynamic_cast.
> > dynamic_cast usage is not allowed in VTK.
> > Please use SafeDownCast or some other mechanism instead.
> >
> ==========================================================
> >
> > Not sure how others got these two files
> > committed then ???:
> > Graphics\vtkConvertSelection.cxx
> > IO\vtkSQLiteQuery.cxx
> >
> >
> > Dean
> > _______________________________________________
> > vtk-developers mailing list
> > vtk-developers at vtk.org
> > http://www.vtk.org/mailman/listinfo/vtk-developers
> >
>
>


-- 
Jeff Baumes, Ph.D.
R&D Engineer, Kitware Inc.
(518) 371-3971 x132
jeff.baumes at kitware.com



More information about the vtk-developers mailing list