Embrace nullptr over NULL and 0
This commit is contained in:
1 parent
ae18aa0639
commit
a5d06fde4b
16 files changed
+36
-33
No files matched your search
@@ -75,7 +75,7 @@ QLayoutItem* FlowLayout::takeAt(int index)
|
||||
if (index >= 0 && index < m_item_list.size())
|
||||
return m_item_list.takeAt(index);
|
||||
else
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Qt::Orientations FlowLayout::expandingDirections() const
|
||||
@@ -167,7 +167,7 @@ int FlowLayout::smartSpacing(QStyle::PixelMetric pm) const
|
||||
else if (parent->isWidgetType())
|
||||
{
|
||||
QWidget* pw = static_cast<QWidget*>(parent);
|
||||
return pw->style()->pixelMetric(pm, 0, pw);
|
||||
return pw->style()->pixelMetric(pm, nullptr, pw);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user