richardphibel / rpms / libdnf

Forked from rpms/libdnf 2 years ago
Clone
90b570
diff -Naur a/libdnf/goal/IdQueue.hpp b/libdnf/goal/IdQueue.hpp
90b570
--- a/libdnf/goal/IdQueue.hpp	2019-01-04 14:12:04.000000000 +0100
90b570
+++ b/libdnf/goal/IdQueue.hpp	2019-01-08 09:54:45.858216988 +0100
90b570
@@ -51,13 +51,13 @@
90b570
 };
90b570
 
90b570
 inline IdQueue::IdQueue() { queue_init(&queue); }
90b570
-inline IdQueue::IdQueue(const IdQueue & src) { queue_init_clone(&queue, &src.queue); }
90b570
+inline IdQueue::IdQueue(const IdQueue & src) { queue_init_clone(&queue, const_cast<Queue *>(&src.queue)); }
90b570
 inline IdQueue::IdQueue(IdQueue && src)
90b570
 {
90b570
     queue_init(&queue);
90b570
     std::swap(queue, src.queue);
90b570
 }
90b570
-inline IdQueue::IdQueue(const Queue & src) { queue_init_clone(&queue, &src;; }
90b570
+inline IdQueue::IdQueue(const Queue & src) { queue_init_clone(&queue, const_cast<Queue *>(&src)); }
90b570
 
90b570
 inline IdQueue::~IdQueue() { queue_free(&queue); }
90b570
 
90b570
diff -Naur a/libdnf/repo/solvable/DependencyContainer.cpp b/libdnf/repo/solvable/DependencyContainer.cpp
90b570
--- a/libdnf/repo/solvable/DependencyContainer.cpp	2019-01-04 14:12:04.000000000 +0100
90b570
+++ b/libdnf/repo/solvable/DependencyContainer.cpp	2019-01-08 09:54:19.623031878 +0100
90b570
@@ -32,7 +32,7 @@
90b570
 DependencyContainer::DependencyContainer(const DependencyContainer &src)
90b570
         : sack(src.sack)
90b570
 {
90b570
-    queue_init_clone(&this->queue, &queue);
90b570
+    queue_init_clone(&this->queue, const_cast<Queue *>(&queue));
90b570
 }
90b570
 
90b570
 
90b570
@@ -45,7 +45,7 @@
90b570
 DependencyContainer::DependencyContainer(DnfSack *sack, Queue queue)
90b570
         : sack(sack)
90b570
 {
90b570
-    queue_init_clone(&this->queue, &queue);
90b570
+    queue_init_clone(&this->queue, const_cast<Queue *>(&queue));
90b570
 }
90b570
 
90b570
 DependencyContainer::~DependencyContainer()
90b570
@@ -56,7 +56,7 @@
90b570
 DependencyContainer &DependencyContainer::operator=(DependencyContainer &&src) noexcept
90b570
 {
90b570
     sack = src.sack;
90b570
-    queue_init_clone(&queue, &src.queue);
90b570
+    queue_init_clone(&queue, const_cast<Queue *>(&src.queue));
90b570
     return *this;
90b570
 }
90b570