Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#4831 closed defect (fixed)

explicit default ctor is useless

Reported by: Erik Hovland <erik@…> 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)

libs_libmyth_lcddevice.h-remove-default-ctor.patch (1.6 KB) - added by Erik Hovland <erik@…> 12 years ago.
removes default ctors that might be used inappropriately

Download all attachments as: .zip

Change History (6)

Changed 12 years ago by Erik Hovland <erik@…>

removes default ctors that might be used inappropriately

comment:1 Changed 12 years ago by Isaac Richards

Milestone: 0.210.22

comment:2 Changed 12 years ago by danielk

Owner: changed from Isaac Richards to danielk
Status: newassigned

comment:3 Changed 12 years ago by Nigel

Resolution: fixed
Status: assignedclosed

(In [16351]) Remove a few unused methods. Closes #4831 - patch by Erik Hovland. Not really sure having them is dangerous (since the code that uses these seems to call set*() first), but no real harm in tidying them up either.

comment:4 Changed 12 years ago by Nigel

Oops. Sorry Daniel. I didn't see that you had taken ownership of this one.

comment:5 Changed 12 years ago by Erik Hovland <erik@…>

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.

Note: See TracTickets for help on using tickets.