]> git.saurik.com Git - wxWidgets.git/commitdiff
implemented explicit copy constructor and assignement operator
authorGilles Depeyrot <gilles_depeyrot@mac.com>
Tue, 7 May 2002 20:40:04 +0000 (20:40 +0000)
committerGilles Depeyrot <gilles_depeyrot@mac.com>
Tue, 7 May 2002 20:40:04 +0000 (20:40 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15411 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/accel.h
include/wx/strconv.h
src/common/strconv.cpp

index 986ea9b66df7be570ad692bc1d76cf3a075e0ccb..02bac45939e66e1b51b2689fe8554e4de3854e66 100644 (file)
@@ -44,10 +44,25 @@ class WXDLLEXPORT wxAcceleratorEntry
 public:
     wxAcceleratorEntry(int flags = 0, int keyCode = 0, int cmd = 0,
                        wxMenuItem *item = NULL)
+        : m_flags(flags)
+        , m_keyCode(keyCode)
+        , m_command(cmd)
+        , m_item(item)
+        { }
+
+    wxAcceleratorEntry(const wxAcceleratorEntry& entry)
+        : m_flags(entry.m_flags)
+        , m_keyCode(entry.m_keyCode)
+        , m_command(entry.m_command)
+        , m_item(entry.m_item)
+        { }
+
+    wxAcceleratorEntry& operator=(const wxAcceleratorEntry& entry)
     {
-        Set(flags, keyCode, cmd, item);
+        Set(entry.m_flags, entry.m_keyCode, entry.m_command, entry.m_item);
+        return *this;
     }
-
+    
     void Set(int flags, int keyCode, int cmd, wxMenuItem *item = NULL)
     {
         m_flags = flags;
index a329062f5cf37bcb6515cfe1496f93676c34f6a2..81015e32403888b8cf031b547e9741283b4c97fe 100644 (file)
@@ -124,8 +124,11 @@ class WXDLLEXPORT wxCSConv : public wxMBConv
 {
 public:
     wxCSConv(const wxChar *charset);
+    wxCSConv(const wxCSConv& conv);
     virtual ~wxCSConv();
 
+    wxCSConv& operator=(const wxCSConv& conv);
+    
     void LoadNow();
 
     virtual size_t MB2WC(wchar_t *buf, const char *psz, size_t n) const;
index 677ad2714da717144cbda3cfc3f4c8cfb450d4c8..bdb210d538f727f131c99d5f2dcaf9805b027686 100644 (file)
@@ -920,6 +920,20 @@ wxCSConv::~wxCSConv()
     Clear();
 }
 
+wxCSConv::wxCSConv(const wxCSConv& conv)
+    : wxMBConv()
+{
+    Clear();
+    SetName(conv.m_name);
+}
+
+wxCSConv& wxCSConv::operator=(const wxCSConv& conv)
+{
+    Clear();
+    SetName(conv.m_name);
+    return *this;
+}
+
 void wxCSConv::Clear()
 {
     if (m_name)