You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by hw...@apache.org on 2010/10/04 23:03:11 UTC

svn commit: r1004425 - /subversion/branches/object-model/subversion/bindings/c++/include/Types.h

Author: hwright
Date: Mon Oct  4 21:03:10 2010
New Revision: 1004425

URL: http://svn.apache.org/viewvc?rev=1004425&view=rev
Log:
On the object-model branch:

* subversion/bindings/c++/include/Types.h
  (ClientNotifyInfo): Convert to use our reference-counting smart pointer.

Modified:
    subversion/branches/object-model/subversion/bindings/c++/include/Types.h

Modified: subversion/branches/object-model/subversion/bindings/c++/include/Types.h
URL: http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/bindings/c%2B%2B/include/Types.h?rev=1004425&r1=1004424&r2=1004425&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/bindings/c++/include/Types.h (original)
+++ subversion/branches/object-model/subversion/bindings/c++/include/Types.h Mon Oct  4 21:03:10 2010
@@ -236,36 +236,27 @@ class Lock
 class ClientNotifyInfo
 {
   public:
-    inline
-    ClientNotifyInfo(const svn_wc_notify_t *info)
-      : m_pool()
+    inline static svn_wc_notify_t *
+    dup(const svn_wc_notify_t *notify, Pool &pool)
     {
-      m_notify = svn_wc_dup_notify(info, m_pool.pool());
+      return svn_wc_dup_notify(notify, pool.pool());
     }
 
     inline
-    ClientNotifyInfo(const ClientNotifyInfo &that)
-      : m_pool()
-    {
-      m_notify = svn_wc_dup_notify(that.m_notify, m_pool.pool());
-    }
-
-    inline ClientNotifyInfo &
-    operator=(const ClientNotifyInfo &that)
+    ClientNotifyInfo(const svn_wc_notify_t *notify)
+      : m_notify(notify)
     {
-      m_pool.clear();
-      m_notify = svn_wc_dup_notify(that.m_notify, m_pool.pool());
     }
 
     // ### This is only temporary
-    inline const svn_wc_notify_t * to_c() const
+    inline const svn_wc_notify_t *
+    to_c() const
     {
-      return m_notify;
+      return &(*m_notify);
     }
 
   private:
-    Pool m_pool;
-    svn_wc_notify_t *m_notify;
+    Private::CStructWrapper<ClientNotifyInfo, const svn_wc_notify_t> m_notify;
 };
 
 }