From 3581498db2d93d226c69cd49d9f0144fe12e4807 Mon Sep 17 00:00:00 2001 From: Marc Lepage <67919234+mlepage-google@users.noreply.github.com> Date: Wed, 9 Feb 2022 12:36:25 -0500 Subject: [PATCH] Use PasscodeId in NodeId functions (#14960) Instead of underlying uint16_t type. Part of issue #14439 --- src/lib/core/NodeId.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib/core/NodeId.h b/src/lib/core/NodeId.h index 23925927404ea9..a9a50d05a97836 100644 --- a/src/lib/core/NodeId.h +++ b/src/lib/core/NodeId.h @@ -18,6 +18,7 @@ #pragma once #include +#include #include @@ -79,12 +80,12 @@ constexpr NodeId NodeIdFromGroupId(GroupId aGroupId) return kMinGroupNodeId | aGroupId; } -constexpr NodeId NodeIdFromPAKEKeyId(uint16_t aPAKEKeyId) +constexpr NodeId NodeIdFromPAKEKeyId(PasscodeId aPAKEKeyId) { return kMinPAKEKeyId | aPAKEKeyId; } -constexpr uint16_t PAKEKeyIdFromNodeId(NodeId aNodeId) +constexpr PasscodeId PAKEKeyIdFromNodeId(NodeId aNodeId) { return aNodeId & kMaskPAKEKeyId; }