Skip to content

Commit bcc176e

Browse files
vhutterpaceholder
authored andcommitted
Fix MSVC warnings for implicit cast
1 parent 3ec420f commit bcc176e

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/NodePainter.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,9 @@ drawFilledConnectionPoints(QPainter * painter,
205205

206206
for (size_t i = 0; i < n; ++i)
207207
{
208-
QPointF p = geom.portScenePosition(i, portType);
208+
QPointF p = geom.portScenePosition(
209+
static_cast<PortIndex>(i),
210+
static_cast<PortType>(portType));
209211

210212
if (!state.getEntries(portType)[i].empty())
211213
{
@@ -289,7 +291,7 @@ drawEntryLabels(QPainter * painter,
289291

290292
for (size_t i = 0; i < n; ++i)
291293
{
292-
QPointF p = geom.portScenePosition(i, portType);
294+
QPointF p = geom.portScenePosition(static_cast<PortIndex>(i), portType);
293295

294296
if (entries[i].empty())
295297
painter->setPen(nodeStyle.FontColorFaded);
@@ -298,9 +300,9 @@ drawEntryLabels(QPainter * painter,
298300

299301
QString s;
300302

301-
if (model->portCaptionVisible(portType, i))
303+
if (model->portCaptionVisible(portType, static_cast<PortIndex>(i)))
302304
{
303-
s = model->portCaption(portType, i);
305+
s = model->portCaption(portType, static_cast<PortIndex>(i));
304306
}
305307
else
306308
{

0 commit comments

Comments
 (0)