Title: [102669] trunk/Source/WebCore
Revision
102669
Author
[email protected]
Date
2011-12-13 04:03:37 -0800 (Tue, 13 Dec 2011)

Log Message

CollectionCache: Remove unused copy constructor and make it noncopyable.
<http://webkit.org/b/74378>

Reviewed by Simon Hausmann.

* html/CollectionCache.cpp:
* html/CollectionCache.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (102668 => 102669)


--- trunk/Source/WebCore/ChangeLog	2011-12-13 10:37:40 UTC (rev 102668)
+++ trunk/Source/WebCore/ChangeLog	2011-12-13 12:03:37 UTC (rev 102669)
@@ -1,3 +1,13 @@
+2011-12-12  Andreas Kling  <[email protected]>
+
+        CollectionCache: Remove unused copy constructor and make it noncopyable.
+        <http://webkit.org/b/74378>
+
+        Reviewed by Simon Hausmann.
+
+        * html/CollectionCache.cpp:
+        * html/CollectionCache.h:
+
 2011-12-13  Jarred Nicholls  <[email protected]>
 
         XHR should use m_responseTypeCode internally to be consistent with WebKit coding style

Modified: trunk/Source/WebCore/html/CollectionCache.cpp (102668 => 102669)


--- trunk/Source/WebCore/html/CollectionCache.cpp	2011-12-13 10:37:40 UTC (rev 102668)
+++ trunk/Source/WebCore/html/CollectionCache.cpp	2011-12-13 12:03:37 UTC (rev 102669)
@@ -32,42 +32,6 @@
     reset();
 }
 
-inline void CollectionCache::copyCacheMap(NodeCacheMap& dest, const NodeCacheMap& src)
-{
-    ASSERT(dest.isEmpty());
-    NodeCacheMap::const_iterator end = src.end();
-    for (NodeCacheMap::const_iterator it = src.begin(); it != end; ++it)
-        dest.add(it->first, adoptPtr(new Vector<Element*>(*it->second)));
-}
-
-CollectionCache::CollectionCache(const CollectionCache& other)
-    : version(other.version)
-    , current(other.current)
-    , position(other.position)
-    , length(other.length)
-    , elementsArrayPosition(other.elementsArrayPosition)
-    , hasLength(other.hasLength)
-    , hasNameCache(other.hasNameCache)
-{
-    copyCacheMap(idCache, other.idCache);
-    copyCacheMap(nameCache, other.nameCache);
-}
-
-void CollectionCache::swap(CollectionCache& other)
-{
-    std::swap(version, other.version);
-    std::swap(current, other.current);
-    std::swap(position, other.position);
-    std::swap(length, other.length);
-    std::swap(elementsArrayPosition, other.elementsArrayPosition);
-
-    idCache.swap(other.idCache);
-    nameCache.swap(other.nameCache);
-    
-    std::swap(hasLength, other.hasLength);
-    std::swap(hasNameCache, other.hasNameCache);
-}
-
 void CollectionCache::reset()
 {
     current = 0;

Modified: trunk/Source/WebCore/html/CollectionCache.h (102668 => 102669)


--- trunk/Source/WebCore/html/CollectionCache.h	2011-12-13 10:37:40 UTC (rev 102668)
+++ trunk/Source/WebCore/html/CollectionCache.h	2011-12-13 12:03:37 UTC (rev 102669)
@@ -30,19 +30,11 @@
 class Element;
 
 struct CollectionCache {
-    WTF_MAKE_FAST_ALLOCATED;
+    WTF_MAKE_FAST_ALLOCATED; WTF_MAKE_NONCOPYABLE(CollectionCache);
 public:
     CollectionCache();
-    CollectionCache(const CollectionCache&);
-    CollectionCache& operator=(const CollectionCache& other)
-    {
-        CollectionCache tmp(other);    
-        swap(tmp);
-        return *this;
-    }
 
     void reset();
-    void swap(CollectionCache&);
 
     void checkConsistency();
 
@@ -57,9 +49,6 @@
     NodeCacheMap nameCache;
     bool hasLength;
     bool hasNameCache;
-
-private:
-    static void copyCacheMap(NodeCacheMap&, const NodeCacheMap&);
 };
 
 void append(CollectionCache::NodeCacheMap&, const AtomicString&, Element*);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to