src/map.c

changeset 1466
a58c65d31342
parent 1450
09a73312d5ec
--- a/src/map.c	Sat Nov 01 19:48:50 2025 +0100
+++ b/src/map.c	Sun Nov 02 18:04:35 2025 +0100
@@ -168,15 +168,6 @@
         cx_clone_func clone_func, const CxAllocator *clone_allocator, void *data) {
     if (clone_allocator == NULL) clone_allocator = cxDefaultAllocator;
 
-    // if the destination map already contains something,
-    // remove what does not belong to the difference
-    CxMapIterator dst_iter = cxMapIteratorKeys(dst);
-    cx_foreach(const CxHashKey *, key, dst_iter) {
-        if (cxMapContains(subtrahend, *key)) {
-            cxIteratorFlagRemoval(dst_iter);
-        }
-    }
-
     CxMapIterator src_iter = cxMapIterator(minuend);
     cx_foreach(const CxMapEntry *, entry, src_iter) {
         if (cxMapContains(subtrahend, *entry->key)) {
@@ -203,15 +194,6 @@
         cx_clone_func clone_func, const CxAllocator *clone_allocator, void *data) {
     if (clone_allocator == NULL) clone_allocator = cxDefaultAllocator;
 
-    // if the destination map already contains something,
-    // remove what does not belong to the difference
-    CxMapIterator dst_iter = cxMapIteratorKeys(dst);
-    cx_foreach(const CxHashKey *, key, dst_iter) {
-        if (cxListContains(keys, key)) {
-            cxIteratorFlagRemoval(dst_iter);
-        }
-    }
-
     CxMapIterator src_iter = cxMapIterator(src);
     cx_foreach(const CxMapEntry *, entry, src_iter) {
         if (cxListContains(keys, entry->key)) {

mercurial