aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/scenegraph/graph/noisynode.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/quick/scenegraph/graph/noisynode.cpp')
-rw-r--r--examples/quick/scenegraph/graph/noisynode.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/examples/quick/scenegraph/graph/noisynode.cpp b/examples/quick/scenegraph/graph/noisynode.cpp
index e85757d426..c39e775e98 100644
--- a/examples/quick/scenegraph/graph/noisynode.cpp
+++ b/examples/quick/scenegraph/graph/noisynode.cpp
@@ -107,10 +107,8 @@ public:
if (!state.texture || !other->state.texture)
return state.texture ? 1 : -1;
- if (qint64 diff = state.texture->comparisonKey() - other->state.texture->comparisonKey())
- return diff;
-
- return 0;
+ const qint64 diff = state.texture->comparisonKey() - other->state.texture->comparisonKey();
+ return diff < 0 ? -1 : (diff > 0 ? 1 : 0);
}
struct {