[vtk-developers] Add GetModifiedTime deprecate GetMTime

Sean McBride sean at rogue-research.com
Fri Aug 5 16:10:47 EDT 2016


On Fri, 5 Aug 2016 15:52:44 -0400, Brad King said:

>On 08/05/16 15:45, Bill Lorensen wrote:
>> Why not in vtkType.h
>> #if defined(WIN32)
>> typedef vtkTypeUInt64 vtkTypeMTime;
>> #else
>> typedef unsigned long vtkTypeMTime;
>> #endif
>>
>> In vtkObject.h and other GetMTimes'
>>   virtual vtkTypeMTime GetMTime();
>>
>> Windows apps will have to change their GetMTimes' in their VTK derived
>> subclasses.
>
>With a trivial re-ordering in `Common/Core/vtkType.h` to
>prefer `long` over `long long` when the former is 64-bit
>then `vtkTypeUInt64` will be selected as above automatically
>and can serve this role without a separate typedef.  This
>would make vtkType.h more consistent anyway.

You mean to change vtkTypeUInt64 to become 'unsigned long' instead of 'unsigned long long' (in the case where they are both 64 bit, that is, on UNIX)?  Isn't that risky too?  Isn't C++ very picky about types?  Can't one have function/method overload differing only by type, ie:

	int foo(long a);
	int foo(long long a);

so someone might have;

	int foo(long a);
	int foo(vtkTypeInt64 a);

then your change would break that.  Not all that likely, but, I dunno... I wouldn't change vtkTypeUInt64 like that... (what I would do (one day) is redefine all those in terms of the C++11 fixed sized types, but that's another topic).

Cheers,

-- 
____________________________________________________________
Sean McBride, B. Eng                 sean at rogue-research.com
Rogue Research                        www.rogue-research.com 
Mac Software Developer              Montréal, Québec, Canada




More information about the vtk-developers mailing list