Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,9 @@ target_compile_definitions(QtNodes
QT_NO_KEYWORDS
)

if(MSVC)
string(REGEX REPLACE "/W[0-4]" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
endif()

target_compile_options(QtNodes
PRIVATE
Expand Down
8 changes: 6 additions & 2 deletions src/AbstractGraphModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ void AbstractGraphModel::portsAboutToBeDeleted(NodeId const nodeId,
// Erases the information about the port on one side;
auto c = makeIncompleteConnectionId(connectionId, portType);

c = makeCompleteConnectionId(c, nodeId, portIndex - nRemovedPorts);
c = makeCompleteConnectionId(c,
nodeId,
portIndex - static_cast<QtNodes::PortIndex>(nRemovedPorts));

_shiftedByDynamicPortsConnections.push_back(c);

Expand Down Expand Up @@ -84,7 +86,9 @@ void AbstractGraphModel::portsAboutToBeInserted(NodeId const nodeId,
// Erases the information about the port on one side;
auto c = makeIncompleteConnectionId(connectionId, portType);

c = makeCompleteConnectionId(c, nodeId, portIndex + nNewPorts);
c = makeCompleteConnectionId(c,
nodeId,
portIndex + static_cast<QtNodes::PortIndex>(nNewPorts));

_shiftedByDynamicPortsConnections.push_back(c);

Expand Down
Loading