diff --git a/include/lucene++/Collection.h b/include/lucene++/Collection.h index 0263f3f1..aeefda5f 100644 --- a/include/lucene++/Collection.h +++ b/include/lucene++/Collection.h @@ -167,7 +167,7 @@ class Collection : public LuceneSync { } void swap(this_type& other) { - container.swap(other->container); + container.swap(other.container); } TYPE& operator[] (int32_t pos) { diff --git a/include/lucene++/Set.h b/include/lucene++/Set.h index 7282cc96..b211d881 100644 --- a/include/lucene++/Set.h +++ b/include/lucene++/Set.h @@ -108,7 +108,7 @@ class Set : public LuceneSync { } void swap(this_type& other) { - setContainer.swap(other->setContainer); + setContainer.swap(other.setContainer); } operator bool() const {