From 0558db7b54a60297444ff3a9a0d49651383bf825 Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Mon, 23 Jul 2018 22:28:49 +0200 Subject: Debugger: Modernize modernize-use-auto modernize-use-nullptr modernize-use-override modernize-use-using modernize-use-default-member-init modernize-use-equals-default Change-Id: I91a6874f0d7b94e9079ab4ef07c23c60c80be9c0 Reviewed-by: Christian Stenger Reviewed-by: hjk --- src/plugins/debugger/watchdata.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/plugins/debugger/watchdata.cpp') diff --git a/src/plugins/debugger/watchdata.cpp b/src/plugins/debugger/watchdata.cpp index d6f9ca8c64..128b790f30 100644 --- a/src/plugins/debugger/watchdata.cpp +++ b/src/plugins/debugger/watchdata.cpp @@ -236,9 +236,9 @@ public: void decodeArrayHelper(int childSize) { const QByteArray ba = QByteArray::fromHex(rawData.toUtf8()); - const T *p = (const T *) ba.data(); + const auto p = (const T*)ba.data(); for (int i = 0, n = ba.size() / sizeof(T); i < n; ++i) { - WatchItem *child = new WatchItem; + auto child = new WatchItem; child->arrayIndex = i; child->value = decodeItemHelper(p[i]); child->size = childSize; @@ -409,7 +409,7 @@ void WatchItem::parseHelper(const GdbMi &input, bool maySort) for (int i = 0, n = int(children.children().size()); i != n; ++i) { const GdbMi &subinput = children.children().at(i); - WatchItem *child = new WatchItem; + auto child = new WatchItem; if (childType.isValid()) child->type = childType.data(); if (childNumChild.isValid()) @@ -505,7 +505,7 @@ QString WatchItem::toToolTip() const if (arrayIndex >= 0) formatToolTipRow(str, tr("Array Index"), QString::number(arrayIndex)); if (size) - formatToolTipRow(str, tr("Static Object Size"), tr("%n bytes", 0, size)); + formatToolTipRow(str, tr("Static Object Size"), tr("%n bytes", nullptr, size)); formatToolTipRow(str, tr("Internal ID"), internalName()); str << ""; return res; -- cgit v1.2.1