Commit d1d52e66 authored by Michael Reeves's avatar Michael Reeves

Fix gcc/clang tidy warnings

parent b058c060
Pipeline #8168 passed with stage
in 9 minutes and 31 seconds
......@@ -49,7 +49,7 @@ private Q_SLOTS:
private:
QList<QUrl> m_list;
QWidget* m_pParentWidget;
QWidget* m_pParentWidget = nullptr;
//KFileItemListProperties m_fileItemInfos;
};
#endif
......@@ -115,7 +115,7 @@ class SourceData
};
FileData m_normalData;
FileData m_lmppData;
QTextCodec* m_pEncoding;
QTextCodec* m_pEncoding = nullptr;
};
#endif // !SOURCEDATA_H
......@@ -234,7 +234,7 @@ class Diff3LineList : public std::list<Diff3Line>
void calcWhiteDiff3Lines(const LineData* pldA, const LineData* pldB, const LineData* pldC);
//TODO: Add safety guards to prevent list from getting too large. Same problem as with QLinkedList.
int size() const {
if(std::list<Diff3Line>::size() > std::numeric_limits<int>::max())
if(std::list<Diff3Line>::size() > (size_t)std::numeric_limits<int>::max())//explicit cast insure correct results
{
qCDebug(kdeMain) << "Diff3Line: List too large. size=" << std::list<Diff3Line>::size();
Q_ASSERT(false);//Unsupported size
......
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