Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk® FBX® / FBX SDK / KTimeSpan - GetStart, GetStop and operator!= should be const, or have appropriately const-correct overloads
  RSS 2.0 ATOM  

KTimeSpan - GetStart, GetStop and operator!= should be const, or have appropriately const-correct overloads
Rate this thread
 
48455
 
Permlink of this thread  
avatar
  • Total Posts: 9
  • Joined: 19 September 2010 01:36 PM

As the title suggests—KTimeSpan::GetStart and KTimeSpan::GetStop are currently non-const, and return non-const references. It should really be possible to call these functions on a const KTimeSpan, since they’re only retrieving values. There should therefore be a const version that returns a const reference.

Same goes for operator!=, I suppose, though I admit that I haven’t found this out the hard way yet, and only spotted it when I was looking in the header :) However, it is of course standard practice to permit comparison of const objects.

As both methods are inline, it looks like a safe workaround for now would just be to use a cast.

Thanks,

--Tom



Replies: 1
/userdata/avatar/vx3501hqr_small.jpg

Hi, Tom, Thanks a lot for pointing this out. It is logged as a bug.

Author: Jiayang Xu

Replied: 17 October 2010 03:12 PM