From 06e962f263a86c4b66e1c6195b3d2615695fea1e Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Wed, 21 Feb 2018 11:52:59 +0100 Subject: init variables where they are declared when possible (clang-tidy) clang-tidy -p compile_commands.json $file -checks='-*,modernize-use-default-member-init,readability-redundant-member-init' -config='{CheckOptions: [{key: modernize-use-default-member-init.UseAssignment, value: "1"}]}' -header-filter='qtdeclarative' -fix Change-Id: I705f3235ff129ba68b0d8dad54a083e29fcead5f Reviewed-by: Johan Helsing --- src/qml/compiler/qv4compilercontext_p.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/qml/compiler/qv4compilercontext_p.h') diff --git a/src/qml/compiler/qv4compilercontext_p.h b/src/qml/compiler/qv4compilercontext_p.h index d375942d0e..a78a66db52 100644 --- a/src/qml/compiler/qv4compilercontext_p.h +++ b/src/qml/compiler/qv4compilercontext_p.h @@ -173,10 +173,10 @@ struct Context { // Map from meta property index (existence implies dependency) to notify signal index struct KeyValuePair { - quint32 _key; - quint32 _value; + quint32 _key = 0; + quint32 _value = 0; - KeyValuePair(): _key(0), _value(0) {} + KeyValuePair() {} KeyValuePair(quint32 key, quint32 value): _key(key), _value(value) {} quint32 key() const { return _key; } -- cgit v1.2.3