ClangCodeModel: Modernize

modernize-use-nullptr
modernize-use-auto
modernize-use-override
modernize-use-equals-default
modernize-use-using

Change-Id: I386f885860c01574035c69226240fe3b8e38392c
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
Alessandro Portale
2018-11-04 21:44:21 +01:00
parent 7d1cf8db39
commit 62abfd7b50
16 changed files with 39 additions and 43 deletions

View File

@@ -221,7 +221,7 @@ bool OverviewModel::isGenerated(const QModelIndex &) const
::Utils::Link OverviewModel::linkFromIndex(const QModelIndex &sourceIndex) const
{
TokenTreeItem *item = static_cast<TokenTreeItem *>(itemForIndex(sourceIndex));
auto item = static_cast<TokenTreeItem *>(itemForIndex(sourceIndex));
if (!item)
return {};
return ::Utils::Link(m_filePath, static_cast<int>(item->token.line),
@@ -230,7 +230,7 @@ bool OverviewModel::isGenerated(const QModelIndex &) const
::Utils::LineColumn OverviewModel::lineColumnFromIndex(const QModelIndex &sourceIndex) const
{
TokenTreeItem *item = static_cast<TokenTreeItem *>(itemForIndex(sourceIndex));
auto item = static_cast<TokenTreeItem *>(itemForIndex(sourceIndex));
if (!item)
return {};
return ::Utils::LineColumn(static_cast<int>(item->token.line),
@@ -239,7 +239,7 @@ bool OverviewModel::isGenerated(const QModelIndex &) const
OverviewModel::Range OverviewModel::rangeFromIndex(const QModelIndex &sourceIndex) const
{
TokenTreeItem *item = static_cast<TokenTreeItem *>(itemForIndex(sourceIndex));
auto item = static_cast<TokenTreeItem *>(itemForIndex(sourceIndex));
if (!item)
return {};
const ClangBackEnd::SourceRangeContainer &range = item->token.extraInfo.cursorRange;