Opened 18 years ago
Closed 18 years ago
Last modified 18 years ago
#4831 closed defect (fixed)
explicit default ctor is useless
| Reported by: | Owned by: | danielk | |
|---|---|---|---|
| Priority: | minor | Milestone: | 0.22 |
| Component: | mythtv | Version: | 0.21-fixes |
| Severity: | low | Keywords: | |
| Cc: | Ticket locked: | no |
Description
The classes LCDMenuItem and LCDTextItem both have explicit declarations of default ctors. Since they also have member variables and these explicit declarations do not initialize them, they are considered dangerous since they can be used to make uninitialized objects. They should be removed.
Attachments (1)
Change History (6)
by , 18 years ago
| Attachment: | libs_libmyth_lcddevice.h-remove-default-ctor.patch added |
|---|
comment:1 by , 18 years ago
| Milestone: | 0.21 → 0.22 |
|---|
comment:2 by , 18 years ago
| Owner: | changed from to |
|---|---|
| Status: | new → assigned |
comment:3 by , 18 years ago
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
comment:4 by , 18 years ago
Oops. Sorry Daniel. I didn't see that you had taken ownership of this one.
comment:5 by , 18 years ago
Heh, dangerous was too strong of a word to use. Sorry. I was just saying that any user of the class who instantiated an object using that ctor would not get a ready to go object. And they might not know it since there would be no warning that that was the case. I'll try to tone down the rhetoric in future patches.

removes default ctors that might be used inappropriately