Ticket #4831: libs_libmyth_lcddevice.h-remove-default-ctor.patch

File libs_libmyth_lcddevice.h-remove-default-ctor.patch, 1.6 KB (added by Erik Hovland <erik@…>, 16 years ago)

removes default ctors that might be used inappropriately

  • libs/libmyth/lcddevice.h

    LCDTextItem has a default constructor that doesn't initialize any
    
    From: Erik Hovland <erik@hovland.org>
    
    of the class's members.
    ---
    
     libs/libmyth/lcddevice.h |    7 +------
     1 files changed, 1 insertions(+), 6 deletions(-)
    
    diff --git a/libs/libmyth/lcddevice.h b/libs/libmyth/lcddevice.h
    index bf98c72..ce40da4 100644
    a b enum CHECKED_STATE {CHECKED = 0, UNCHECKED, NOTCHECKABLE }; 
    2020class MPUBLIC LCDMenuItem
    2121{
    2222  public:
    23     LCDMenuItem() {}
    2423    LCDMenuItem(bool item_selected, CHECKED_STATE item_checked,
    2524                QString item_name, unsigned int item_indent  = 0)
    2625    {
    2726        selected = item_selected;
    2827        checked = item_checked;
    2928        name = item_name;
     29        scroll = false;
    3030        indent = item_indent;
    3131        scrollPosition = indent;
    3232    }
    3333
    34    ~LCDMenuItem() {}
    35 
    3634    CHECKED_STATE isChecked() { return checked; }
    3735    bool isSelected() { return selected; }
    3836    QString ItemName() { return name; }
    enum TEXT_ALIGNMENT {ALIGN_LEFT, ALIGN_RIGHT, ALIGN_CENTERED }; 
    6260class MPUBLIC LCDTextItem
    6361{
    6462  public:
    65     LCDTextItem() {}
    6663    LCDTextItem(unsigned int row, TEXT_ALIGNMENT align, QString text,
    6764                QString screen = "Generic", bool scroll = false,
    6865                QString widget = "textWidget")
    class MPUBLIC LCDTextItem 
    7572        itemScrollable = scroll;
    7673    }
    7774
    78    ~LCDTextItem(){};
    79 
    8075    unsigned int getRow() { return itemRow; }
    8176    TEXT_ALIGNMENT getAlignment() { return itemAlignment; }
    8277    QString getText() { return itemText; }