Skip to content

Commit

Permalink
make variant index casts more explicit (#635)
Browse files Browse the repository at this point in the history
  • Loading branch information
DmitriyMusatkin authored Jul 3, 2024
1 parent 6351069 commit fce6e7b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions include/aws/crt/Variant.h
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,8 @@ namespace Aws
}
else
{
VisitorUtil<Index + 1, Second, Rest...>::Visit(pThis, std::forward<VisitorStruct>(visitor));
VisitorUtil<static_cast<IndexT>(Index + 1), Second, Rest...>::Visit(
pThis, std::forward<VisitorStruct>(visitor));
}
}

Expand All @@ -490,7 +491,7 @@ namespace Aws
}
else
{
VisitorUtil<Index + 1, Second, Rest...>::VisitBinary(
VisitorUtil<static_cast<IndexT>(Index + 1), Second, Rest...>::VisitBinary(
pThis, std::forward<Variant<Ts...>>(other), std::forward<VisitorStruct>(visitor));
}
}
Expand All @@ -509,7 +510,7 @@ namespace Aws
}
else
{
VisitorUtil<Index + 1, Second, Rest...>::VisitBinary(
VisitorUtil<static_cast<IndexT>(Index + 1), Second, Rest...>::VisitBinary(
pThis, other, std::forward<VisitorStruct>(visitor));
}
}
Expand Down

0 comments on commit fce6e7b

Please sign in to comment.