Replace wxScopedPtr with std::unique_ptr
Upstream has deprecated wxScopedPtr and recommends users switch to using std::unique_ptr instead.
This commit is contained in:
parent
c3ae2d4f43
commit
f0684510f0
|
@ -17,6 +17,7 @@
|
|||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <memory>
|
||||
#include <wx/dir.h>
|
||||
#include <wx/filedlg.h>
|
||||
#include <wx/fs_zip.h>
|
||||
|
@ -62,7 +63,7 @@ bool PROJECT_ARCHIVER::Unarchive( const wxString& aSrcFile, const wxString& aDes
|
|||
return false;
|
||||
}
|
||||
|
||||
wxScopedPtr<wxArchiveInputStream> archiveStream( archiveClassFactory->NewStream( stream ) );
|
||||
std::unique_ptr<wxArchiveInputStream> archiveStream( archiveClassFactory->NewStream( stream ) );
|
||||
|
||||
wxString fileStatus;
|
||||
|
||||
|
|
|
@ -31,6 +31,8 @@
|
|||
#ifndef VALIDATORS_H
|
||||
#define VALIDATORS_H
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include <wx/valtext.h>
|
||||
#include <wx/grid.h>
|
||||
#include <wx/regex.h>
|
||||
|
@ -50,7 +52,7 @@ public:
|
|||
virtual void StartingKey( wxKeyEvent& event ) override;
|
||||
|
||||
protected:
|
||||
wxScopedPtr<wxValidator> m_validator;
|
||||
std::unique_ptr<wxValidator> m_validator;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -25,6 +25,8 @@
|
|||
#ifndef GRID_TEXT_BUTTON_HELPERS_H
|
||||
#define GRID_TEXT_BUTTON_HELPERS_H
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include <wx/combo.h>
|
||||
#include <wx/generic/gridctrl.h>
|
||||
#include <wx/generic/grideditors.h>
|
||||
|
@ -58,7 +60,7 @@ protected:
|
|||
wxComboCtrl* Combo() const { return static_cast<wxComboCtrl*>( m_control ); }
|
||||
|
||||
#if wxUSE_VALIDATORS
|
||||
wxScopedPtr< wxValidator > m_validator;
|
||||
std::unique_ptr< wxValidator > m_validator;
|
||||
#endif
|
||||
|
||||
wxString m_value;
|
||||
|
|
Loading…
Reference in New Issue