diff --git a/src/lib/component/controller/GraphController.cpp b/src/lib/component/controller/GraphController.cpp index aa814c49..583f78f4 100644 --- a/src/lib/component/controller/GraphController.cpp +++ b/src/lib/component/controller/GraphController.cpp @@ -1186,7 +1186,7 @@ void GraphController::bundleNodesAndEdgesMatching( DummyNode* firstNode = bundleNode->bundledNodes.begin()->get(); // Use token Id of first node and make first bit 1 - bundleNode->tokenId = ~(~size_t(0) >> 1) + firstNode->data->getId(); + bundleNode->tokenId = ~(~Id(0) >> 1) + firstNode->data->getId(); bundleNode->bundleInfo.layoutVertical = firstNode->bundleInfo.layoutVertical; bundleNode->bundleInfo.isReferenced = firstNode->bundleInfo.isReferenced; bundleNode->bundleInfo.isReferencing = firstNode->bundleInfo.isReferencing; @@ -1272,7 +1272,7 @@ std::shared_ptr GraphController::bundleNodesMatching( } // Use token Id of first node and make first bit 1 - bundleNode->tokenId = ~(~size_t(0) >> 1) + (*bundleNode->bundledNodes.begin())->data->getId(); + bundleNode->tokenId = ~(~Id(0) >> 1) + (*bundleNode->bundledNodes.begin())->data->getId(); return bundleNode; } @@ -2128,7 +2128,7 @@ void GraphController::relayoutGraph( if (withCharacterIndex && m_dummyNodes.size()) { // Use token Id of first node and make first 2 bits 1 - Id groupId = ~(~size_t(0) >> 2) + m_dummyNodes[0]->tokenId; + Id groupId = ~(~Id(0) >> 2) + m_dummyNodes[0]->tokenId; DummyNode* group = groupAllNodes(GroupType::DEFAULT, groupId); group->groupLayout = GroupLayout::LIST; diff --git a/src/lib/utility/types.h b/src/lib/utility/types.h index 9633087e..e853233c 100644 --- a/src/lib/utility/types.h +++ b/src/lib/utility/types.h @@ -1,7 +1,7 @@ #ifndef TYPES_H #define TYPES_H -typedef unsigned long Id; +typedef size_t Id; typedef unsigned int uint;