Commit c3dd6989 authored by Michael Reeves's avatar Michael Reeves

Use TYPE_MAX

parent de1f1f8f
......@@ -260,7 +260,7 @@ class Diff3LineList : public std::list<Diff3Line>
//TODO: Add safety guards to prevent list from getting too large. Same problem as with QLinkedList.
int size() const
{
if(std::list<Diff3Line>::size() > (size_t)std::numeric_limits<int>::max())//explicit cast to silence gcc
if(std::list<Diff3Line>::size() > (size_t)TYPE_MAX(int))//explicit cast to silence gcc
{
qCDebug(kdiffMain) << "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