Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Do explicit casting from size_t to uint/int

GIT_SILENT
parent 21798718
......@@ -643,8 +643,8 @@ private Q_SLOTS:
Extractor, UintSetVisitor> visit(v, set1.iterator(), repSet2);
}
totalItems += testSet1.size();
totalFilteredItems += algoFiltered.size();
totalItems += static_cast<uint>(testSet1.size());
totalFilteredItems += static_cast<uint>(algoFiltered.size());
std::set<uint> stdFiltered;
......
......@@ -66,7 +66,7 @@ private:
inline int OutlineNode::childCount() const
{
return m_children.size();
return static_cast<int>(m_children.size());
}
inline const std::vector<OutlineNode>& OutlineNode::children() const
......@@ -90,7 +90,7 @@ inline int OutlineNode::indexOf(const OutlineNode* child) const
// Comparing the address here is only fine since we never modify the vector after initial creation
for (size_t i = 0; i < max; i++) {
if (child == &m_children[i]) {
return i;
return static_cast<int>(i);
}
}
return -1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment