From 643de4890af4d5bbfe141ed6ff7dfa205dbff7f3 Mon Sep 17 00:00:00 2001 From: joerg Date: Fri, 23 Nov 2012 12:29:15 +0000 Subject: Don't use variable length arrays of non-POD types. --- graphics/extrema/distinfo | 6 ++++- .../patches/patch-src_wxForms_AxisPopup.cpp | 28 ++++++++++++++++++++++ .../patches/patch-src_wxForms_FontChooser.cpp | 16 +++++++++++++ .../patches/patch-src_wxForms_LegendPopup.cpp | 17 +++++++++++++ .../patches/patch-src_wxForms_TextPopup.cpp | 17 +++++++++++++ 5 files changed, 83 insertions(+), 1 deletion(-) create mode 100644 graphics/extrema/patches/patch-src_wxForms_AxisPopup.cpp create mode 100644 graphics/extrema/patches/patch-src_wxForms_FontChooser.cpp create mode 100644 graphics/extrema/patches/patch-src_wxForms_LegendPopup.cpp create mode 100644 graphics/extrema/patches/patch-src_wxForms_TextPopup.cpp (limited to 'graphics/extrema') diff --git a/graphics/extrema/distinfo b/graphics/extrema/distinfo index a8be4ee9cc3..7f3d6334afc 100644 --- a/graphics/extrema/distinfo +++ b/graphics/extrema/distinfo @@ -1,6 +1,10 @@ -$NetBSD: distinfo,v 1.4 2012/06/24 01:49:14 dholland Exp $ +$NetBSD: distinfo,v 1.5 2012/11/23 12:29:15 joerg Exp $ SHA1 (extrema-4.4.4.tar.gz) = eff38eb3c36aa9acc3ad471ea57f2037c66e1842 RMD160 (extrema-4.4.4.tar.gz) = 4ce6dcacca51ac18deb770cd9c0f7f77d0458ccd Size (extrema-4.4.4.tar.gz) = 6404330 bytes SHA1 (patch-src_Graphics_GRA__thiessenTriangulation_h) = ede808bc2f19f3aafb31310eb04aa5317ad9b471 +SHA1 (patch-src_wxForms_AxisPopup.cpp) = 8b96ab1d88f5abfaa6d45562bc02c990b8143a48 +SHA1 (patch-src_wxForms_FontChooser.cpp) = bc6a979c8d693347efdf581653008a62abce149a +SHA1 (patch-src_wxForms_LegendPopup.cpp) = 51491d6fe345c380dda6044d4c463d9f8da5fe49 +SHA1 (patch-src_wxForms_TextPopup.cpp) = 314885dc14f69b113af801c5d421c16d107c0887 diff --git a/graphics/extrema/patches/patch-src_wxForms_AxisPopup.cpp b/graphics/extrema/patches/patch-src_wxForms_AxisPopup.cpp new file mode 100644 index 00000000000..a0dbff8ee54 --- /dev/null +++ b/graphics/extrema/patches/patch-src_wxForms_AxisPopup.cpp @@ -0,0 +1,28 @@ +$NetBSD: patch-src_wxForms_AxisPopup.cpp,v 1.1 2012/11/23 12:29:15 joerg Exp $ + +--- src/wxForms/AxisPopup.cpp.orig 2012-11-21 22:06:14.000000000 +0000 ++++ src/wxForms/AxisPopup.cpp +@@ -214,9 +214,10 @@ void AxisPopup::MakeNumbersPanel() + + sizer->Add( new wxStaticText(panel,wxID_ANY,wxT("Font ")), wxSizerFlags(0).Left().Border(wxTOP,5) ); + int nf = GRA_fontControl::GetCount(); +- wxString choices[nf]; ++ wxString *choices = new wxString[nf]; + for( int i=0; iGetFontName(); + nFontCB_ = new wxComboBox( panel, ID_numbersFont, wxT(""), wxDefaultPosition, wxSize(200,25), nf, choices, wxCB_READONLY ); ++ delete[] choices; + nFontCB_->SetToolTip( wxT("choose the axis numbers font") ); + sizer->Add( nFontCB_, wxSizerFlags(0).Left().Border(wxALL,2) ); + +@@ -268,9 +269,10 @@ void AxisPopup::MakeLabelPanel() + + topSizer->Add( new wxStaticText(topPanel,wxID_ANY,wxT("Font ")), wxSizerFlags(0).Left().Border(wxTOP,5) ); + int nf = GRA_fontControl::GetCount(); +- wxString choices[nf]; ++ wxString *choices = new wxString[nf]; + for( int i=0; iGetFontName(); + lFontCB_ = new wxComboBox( topPanel, ID_labelFont, wxT(""), wxDefaultPosition, wxSize(200,25), nf, choices, wxCB_READONLY ); ++ delete[] choices; + lFontCB_->SetToolTip( wxT("choose the axis label font") ); + topSizer->Add( lFontCB_, wxSizerFlags(0).Left().Border(wxALL,2) ); + diff --git a/graphics/extrema/patches/patch-src_wxForms_FontChooser.cpp b/graphics/extrema/patches/patch-src_wxForms_FontChooser.cpp new file mode 100644 index 00000000000..c65514649ab --- /dev/null +++ b/graphics/extrema/patches/patch-src_wxForms_FontChooser.cpp @@ -0,0 +1,16 @@ +$NetBSD: patch-src_wxForms_FontChooser.cpp,v 1.1 2012/11/23 12:29:15 joerg Exp $ + +--- src/wxForms/FontChooser.cpp.orig 2012-11-21 22:08:15.000000000 +0000 ++++ src/wxForms/FontChooser.cpp +@@ -101,9 +101,10 @@ void FontChooser::CreateForm() + topSizer->Add( new wxStaticText(topPanel,wxID_ANY,wxT("Font ")), wxSizerFlags(0).Right().Border(wxTOP,5) ); + // + int nf = GRA_fontControl::GetCount(); +- wxString choices[nf]; ++ wxString *choices = new wxString[nf]; + for( int i=0; iGetFontName(); + fontCB_ = new wxComboBox( topPanel, ID_font, wxT(""), wxDefaultPosition, wxSize(200,25), nf, choices, wxCB_READONLY ); ++ delete[] choices; + topSizer->Add( fontCB_, wxSizerFlags(1).Left().Border(wxALL,2) ); + topPanel->SetSizer( topSizer ); + mainSizer->Add( topPanel, wxSizerFlags(0).Expand().Border(wxALL,2) ); diff --git a/graphics/extrema/patches/patch-src_wxForms_LegendPopup.cpp b/graphics/extrema/patches/patch-src_wxForms_LegendPopup.cpp new file mode 100644 index 00000000000..99f2396cf9e --- /dev/null +++ b/graphics/extrema/patches/patch-src_wxForms_LegendPopup.cpp @@ -0,0 +1,17 @@ +$NetBSD: patch-src_wxForms_LegendPopup.cpp,v 1.1 2012/11/23 12:29:15 joerg Exp $ + +--- src/wxForms/LegendPopup.cpp.orig 2012-11-21 22:11:15.000000000 +0000 ++++ src/wxForms/LegendPopup.cpp +@@ -166,10 +166,11 @@ void LegendPopup::CreateForm() + titleBotSizer->Add( new wxStaticText(titleBotPanel,wxID_ANY,wxT("Font")), + wxSizerFlags(0).Left().Border(wxALL,2) ); + int nf = GRA_fontControl::GetCount(); +- wxString choices[nf]; ++ wxString *choices = new wxString[nf]; + for( int i=0; iGetFontName(); + titleFontCB_ = new wxComboBox( titleBotPanel, ID_font, wxT(""), wxDefaultPosition, wxSize(200,25), nf, + choices, wxCB_READONLY ); ++ delete[] choices; + titleFontCB_->SetToolTip( wxT("choose the title font") ); + titleBotSizer->Add( titleFontCB_, wxSizerFlags(0).Left().Border(wxALL,2) ); + diff --git a/graphics/extrema/patches/patch-src_wxForms_TextPopup.cpp b/graphics/extrema/patches/patch-src_wxForms_TextPopup.cpp new file mode 100644 index 00000000000..55d684dfdcb --- /dev/null +++ b/graphics/extrema/patches/patch-src_wxForms_TextPopup.cpp @@ -0,0 +1,17 @@ +$NetBSD: patch-src_wxForms_TextPopup.cpp,v 1.1 2012/11/23 12:29:15 joerg Exp $ + +--- src/wxForms/TextPopup.cpp.orig 2012-11-21 22:13:23.000000000 +0000 ++++ src/wxForms/TextPopup.cpp +@@ -107,10 +107,11 @@ void TextPopup::CreateForm() + // + fSizer->Add( new wxStaticText(fPanel,wxID_ANY,wxT("Font")), wxSizerFlags(0).Left().Border(wxTOP,2) ); + int nf = GRA_fontControl::GetCount(); +- wxString choices[nf]; ++ wxString *choices = new wxString[nf]; + for( int i=0; iGetFontName(); + fontCB_ = new wxComboBox( fPanel, ID_font, wxT(""), wxDefaultPosition, wxSize(200,25), nf, + choices, wxCB_READONLY ); ++ delete[] choices; + fontCB_->SetToolTip( wxT("choose the text font") ); + fSizer->Add( fontCB_, wxSizerFlags(0).Left().Border(wxALL,2) ); + -- cgit v1.2.3