From 303026d86bb4c30c78aec9099b4a4def634f0f07 Mon Sep 17 00:00:00 2001 From: Atlante45 Date: Tue, 9 Jun 2015 15:26:41 +0200 Subject: [PATCH] Reduce qDebug calls --- libraries/entities/src/LineEntityItem.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libraries/entities/src/LineEntityItem.cpp b/libraries/entities/src/LineEntityItem.cpp index bb1e3be539..e7e1c90b41 100644 --- a/libraries/entities/src/LineEntityItem.cpp +++ b/libraries/entities/src/LineEntityItem.cpp @@ -86,6 +86,7 @@ bool LineEntityItem::setProperties(const EntityItemProperties& properties) { void LineEntityItem::setLinePoints(const QVector& points) { QVector sanitizedPoints; + int invalidPoints = 0; for (int i = 0; i < points.size(); i++) { glm::vec3 point = points.at(i); // Make sure all of our points are valid numbers. @@ -93,9 +94,12 @@ void LineEntityItem::setLinePoints(const QVector& points) { if (point.x > 0 && point.y > 0 && point.z > 0){ sanitizedPoints << point; } else { - qDebug() << "INVALID POINT"; + ++invalidPoints; } } + if (invalidPoints > 0) { + qDebug() << "Line with" << invalidPoints << "INVALID POINTS"; + } _points = sanitizedPoints; _pointsChanged = true; }