Anonymous | Login | 2024-10-11 13:10 CDT |
My View | View Issues |
View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||||||
0000305 | Rosetta | [All Projects] Bad Coding | public | 2013-09-25 13:17 | 2013-09-25 13:51 | ||||||||
Reporter | smlewis | ||||||||||||
Assigned To | |||||||||||||
Priority | low | Severity | minor | Reproducibility | always | ||||||||
Status | new | Resolution | open | ||||||||||
Platform | All platforms | OS | Any | OS Version | Any | ||||||||
Product Version | Trunk | ||||||||||||
Fixed in Version | |||||||||||||
Summary | 0000305: pose.constraint_set in NULL case | ||||||||||||
Description | pose.constrant_set(): Pose::ConstraintSetCOP 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? | ||||||||||||
Tags | No tags attached. | ||||||||||||
Application(s) Affected | pose.constraint_set() | ||||||||||||
Command Line Used | pose.constraint_set() | ||||||||||||
Developer Options | |||||||||||||
Fixed in SVN Version | |||||||||||||
Attached Files | |||||||||||||
Notes | |
(0000316) 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 |