Ticket #40386: patch-src-plugins-contrib-profiler-cbprofiler.cpp.diff

File patch-src-plugins-contrib-profiler-cbprofiler.cpp.diff, 1.1 KB (added by mojca (Mojca Miklavec), 11 years ago)
  • src/plugins/contrib/profiler/cbprofiler.cpp

    needed for compilation with clang
    http://developer.berlios.de/patch/index.php?func=detailpatch&patch_id=3496&group_id=5358
    old new int CBProfiler::Execute() 
    101101    if (project->GetBuildTargetsCount() > 1)
    102102    {
    103103        // more than one executable target? ask...
    104         wxString choices[project->GetBuildTargetsCount()];
     104        wxString *choices = new wxString[project->GetBuildTargetsCount()];
    105105        wxString active_target = project->GetActiveBuildTarget();
    106106        int selected = 0;
    107107        for (int i=0; i<project->GetBuildTargetsCount(); ++i)
    int CBProfiler::Execute() 
    114114                                    _("Select the target you want to profile"),
    115115                                    _("Select Target"),project->GetBuildTargetsCount(),choices);
    116116        dialog.SetSelection(selected);
     117        delete [] choices;
    117118        if (dialog.ShowModal() != wxID_OK)
    118119            return -1;
    119120        int targetIndex = dialog.GetSelection();