]> git.saurik.com Git - wxWidgets.git/commitdiff
Add copy constructor to wxValidator.
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 20 Jan 2013 02:09:52 +0000 (02:09 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 20 Jan 2013 02:09:52 +0000 (02:09 +0000)
It can be useful for implementing Clone() in the derived classes.

Closes #2146.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73403 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/validate.h

index 27473364bcd665b29e140a570eb0e9ad7c63f4a2..3f60b593894b5b4261239f2e8af80c92eaf62b3d 100644 (file)
@@ -37,6 +37,10 @@ class WXDLLIMPEXP_CORE wxValidator : public wxEvtHandler
 {
 public:
     wxValidator();
+    wxValidator(const wxValidator& other)
+        : m_validatorWindow(other.m_validatorWindow)
+    {
+    }
     virtual ~wxValidator();
 
     // Make a clone of this validator (or return NULL) - currently necessary
@@ -87,7 +91,7 @@ private:
     static bool ms_isSilent;
 
     DECLARE_DYNAMIC_CLASS(wxValidator)
-    wxDECLARE_NO_COPY_CLASS(wxValidator);
+    wxDECLARE_NO_ASSIGN_CLASS(wxValidator);
 };
 
 extern WXDLLIMPEXP_DATA_CORE(const wxValidator) wxDefaultValidator;