From 6190334bead1f92418c6627404066ddd42fd56a5 Mon Sep 17 00:00:00 2001 From: Simon Friedel Date: Tue, 21 Nov 2023 15:41:45 +0100 Subject: [PATCH] fix clang tidy errors --- tools/fm-editor/CMakeLists.txt | 3 +-- tools/fm-editor/graph/FeatureNode.cpp | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/tools/fm-editor/CMakeLists.txt b/tools/fm-editor/CMakeLists.txt index 2988f53e7..129139824 100644 --- a/tools/fm-editor/CMakeLists.txt +++ b/tools/fm-editor/CMakeLists.txt @@ -54,8 +54,7 @@ add_custom_target( file( WRITE "${CMAKE_CURRENT_BINARY_DIR}/fm-editor_autogen/.clang-tidy" - " -Checks: '-*,llvm-twine-local' + "Checks: '-*,llvm-twine-local' ... " ) diff --git a/tools/fm-editor/graph/FeatureNode.cpp b/tools/fm-editor/graph/FeatureNode.cpp index 43f085380..8a8db6590 100644 --- a/tools/fm-editor/graph/FeatureNode.cpp +++ b/tools/fm-editor/graph/FeatureNode.cpp @@ -107,14 +107,14 @@ void FeatureNode::contextMenuEvent(QGraphicsSceneContextMenuEvent *Event) { void FeatureNode::inspect() { emit(inspectSource(Feature)); } int FeatureNode::width() const { - const QFontMetrics fm((QFont())); + const QFontMetrics Fm((QFont())); - return fm.boundingRect(getQName()).width(); + return Fm.boundingRect(getQName()).width(); } int FeatureNode::childrenWidth() const { if (ChildEdges.empty()) { - return width() + 1.5 * widthAdjust; + return width() + int(1.5 * widthAdjust); } int Result = 0;