News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

no used local typedef

Started by ollydbg, June 01, 2013, 08:36:11 AM

Previous topic - Next topic

ollydbg


BreakpointsDlg::BreakpointsDlg() :
    wxPanel(Manager::Get()->GetAppWindow(), -1),
    m_icons(16, 16, true)
{
    wxBoxSizer* bs = new wxBoxSizer(wxVERTICAL);
    m_pList = new wxListCtrl(this, idList, wxDefaultPosition, wxDefaultSize,
                             wxLC_REPORT | wxLC_HRULES | wxLC_VRULES);
    bs->Add(m_pList, 1, wxEXPAND | wxALL);
    SetAutoLayout(TRUE);
    SetSizer(bs);

    // Setup the image list for the enabled/disabled icons.
    const wxString &basepath = ConfigManager::GetDataFolder() + wxT("/manager_resources.zip#zip:/images/16x16/");
    wxBitmap icon = cbLoadBitmap(basepath + wxT("breakpoint.png"), wxBITMAP_TYPE_PNG);
    if (icon.IsOk())
        m_icons.Add(icon);
    icon = cbLoadBitmap(basepath + wxT("breakpoint_disabled.png"), wxBITMAP_TYPE_PNG);
    if (icon.IsOk())
        m_icons.Add(icon);
    icon = cbLoadBitmap(basepath + wxT("breakpoint_other.png"), wxBITMAP_TYPE_PNG);
    if (icon.IsOk())
        m_icons.Add(icon);
    m_pList->SetImageList(&m_icons, wxIMAGE_LIST_SMALL);

    m_pList->InsertColumn(Type, _("Type"), wxLIST_FORMAT_LEFT, 128);
    m_pList->InsertColumn(FilenameAddress, _("Filename/Address"), wxLIST_FORMAT_LEFT, 128);
    m_pList->InsertColumn(Line, _("Line"), wxLIST_FORMAT_LEFT, 44);
    m_pList->InsertColumn(Info, _("Info"), wxLIST_FORMAT_LEFT, 120);
    m_pList->InsertColumn(Debugger, _("Debugger"), wxLIST_FORMAT_LEFT, 60);

    Connect(idList, -1, wxEVT_COMMAND_LIST_ITEM_ACTIVATED,
            (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction)
            &BreakpointsDlg::OnDoubleClick);

    Connect(idList, -1, wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK,
            (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction)
            &BreakpointsDlg::OnRightClick);

    typedef cbEventFunctor<BreakpointsDlg, CodeBlocksEvent> CBEvent;

    Reload();
}

See:
typedef cbEventFunctor<BreakpointsDlg, CodeBlocksEvent> CBEvent;


Not used, right?
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

oBFusCATed

(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

ollydbg

If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.