View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
---|---|---|---|---|---|---|---|---|---|
0000905 | Spring engine | General | public | 2008-04-28 12:40 | 2008-04-30 13:11 | ||||
Reporter | zenzike | ||||||||
Assigned To | tvo | ||||||||
Priority | normal | Severity | trivial | Reproducibility | always | ||||
Status | resolved | Resolution | fixed | ||||||
Product Version | |||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0000905: [patch] WeaponDefHandler.h non-virtual destructor | ||||||||
Description | The WeaponDef destructor is non-virtual. Patch included. (These are the first minor patches I'm suggesting - I've noticed that the patches I create show too much of the root (ie it includes /home/myname/projects/), is there any way to prevent this?) | ||||||||
Additional Information | Index: spring/rts/Sim/Weapons/WeaponDefHandler.h =================================================================== --- spring/rts/Sim/Weapons/WeaponDefHandler.h (revision 5796) +++ spring/rts/Sim/Weapons/WeaponDefHandler.h (working copy) @@ -33,7 +33,7 @@ { CR_DECLARE(WeaponDef); - ~WeaponDef(); + virtual ~WeaponDef(); std::string name; std::string type; | ||||||||
Tags | No tags attached. | ||||||||
Checked infolog.txt for Errors | |||||||||
Attached Files |
|
Notes | |
tvo (reporter) 2008-04-28 15:36 |
How do you create the patch? svn diff on linux? |
zenzike (reporter) 2008-04-28 15:38 Last edited: 2008-04-28 15:44 |
Yes, I used svn diff, and I'm developing in Linux. |
tvo (reporter) 2008-04-30 13:11 |
I probably solved it by using CR_DECLARE_STRUCT instead of CR_DECLARE in the WeaponDef. (CR_* is our "class registration system", ie. reflection for C++, and CR_DECLARE_STRUCT defines the GetClass method as non-virtual while CR_DECLARE defines it as virtual.) This is better then making dtor virtual because the class really isn't supposed to have any virtual functions. (Since it's just a large collection of weapon properties.) Please reopen if this didn't solve compiler warning. |
Issue History | |||
Date Modified | Username | Field | Change |
---|---|---|---|
2008-04-28 12:40 | zenzike | New Issue | |
2008-04-28 15:35 | tvo | Summary | WeaponDefHandler.h non-virtual destructor => [patch] WeaponDefHandler.h non-virtual destructor |
2008-04-28 15:36 | tvo | Relationship added | related to 0000904 |
2008-04-28 15:36 | tvo | Note Added: 0002172 | |
2008-04-28 15:38 | zenzike | Note Added: 0002174 | |
2008-04-28 15:44 | zenzike | Note Edited: 0002174 | |
2008-04-30 13:10 | tvo | Status | new => assigned |
2008-04-30 13:10 | tvo | Assigned To | => tvo |
2008-04-30 13:11 | tvo | Status | assigned => resolved |
2008-04-30 13:11 | tvo | Resolution | open => fixed |
2008-04-30 13:11 | tvo | Note Added: 0002189 |