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