From 49d1f75864fab656bb784bc6dfe6f9180d82ed8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=91=D1=8B=D1=87=D0=BA=D0=BE=D0=B2=20=D0=90=D0=BD=D0=B4?= =?UTF-8?q?=D1=80=D0=B5=D0=B9?= Date: Thu, 21 Jul 2022 12:09:33 +0300 Subject: [PATCH] enum class --- libs/blockview/blockbusitem.cpp | 6 +++--- libs/blockview/blockbusitem.h | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/libs/blockview/blockbusitem.cpp b/libs/blockview/blockbusitem.cpp index 42c8f6b..14be82f 100644 --- a/libs/blockview/blockbusitem.cpp +++ b/libs/blockview/blockbusitem.cpp @@ -321,13 +321,13 @@ BlockBusItem::PointInfo BlockBusItem::pointInfo(QPointF pos) const { testPoint(pos, &pi, & si); if (pi < 0 && si < 0) return ret; if (si >= 0) { - ret.type = PointInfo::tSegment; + ret.type = PointInfo::Type::Segment; } else { if (endpoints().contains(pi)) { - ret.type = PointInfo::tEndpoint; + ret.type = PointInfo::Type::Endpoint; ret.pin = connections_.value(pi, nullptr); } else - ret.type = PointInfo::tNode; + ret.type = PointInfo::Type::Node; } return ret; } diff --git a/libs/blockview/blockbusitem.h b/libs/blockview/blockbusitem.h index ef76f97..9bef578 100644 --- a/libs/blockview/blockbusitem.h +++ b/libs/blockview/blockbusitem.h @@ -35,13 +35,13 @@ public: ~BlockBusItem() {;} struct QAD_BLOCKVIEW_EXPORT PointInfo { - enum Type { - tNone, - tNode, // point > 2 segments - tEndpoint, - tSegment + enum class Type { + None, + Node, // point > 2 segments + Endpoint, + Segment }; - Type type = tNone; + Type type = Type::None; BlockItemPin * pin = nullptr; // if tEndpoint and pin connected };