Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000305Rosetta[All Projects] Bad Codingpublic2013-09-25 13:172013-09-25 13:51
Assigned To 
PlatformAll platformsOSAnyOS VersionAny
Product VersionTrunk 
Fixed in Version 
Summary0000305: pose.constraint_set in NULL case

Pose::constraint_set() const
    if ( constraint_set_ == 0 ) {
        return new scoring::constraints::ConstraintSet; // create an empty constraint set
    return constraint_set_;

This has the behavior of returning a VALID pointer to an empty constraint set if the Pose has no ConstraintSet...but it doesn't set the Pose to point at that same COP! So, it returns a valid ConstraintSet that isn't actually the Pose's. Is that bad behavior?
TagsNo tags attached.
Application(s) Affectedpose.constraint_set()
Command Line Usedpose.constraint_set()
Developer Options
Fixed in SVN Version
Attached Files

- Relationships

-  Notes
smlewis (Administrator)
2013-09-25 13:51

It's because the "getter" is const, so it can't modify the
Pose::constraint_set_. The question then is, should it be nonconst?
or return NULL? or be as-is?

- Issue History
Date Modified Username Field Change
2013-09-25 13:17 smlewis New Issue
2013-09-25 13:51 smlewis Note Added: 0000316

Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker