Merged PR 4933520: (ap build) Update to GSL 3.1 - Fix signed unsigned cast warning

Fix x86/arm32 build for signed unsigned cast warning.

Related: https://microsoft.visualstudio.com/WindowsAI/_git/WindowsAI/pullrequest/4927342
This commit is contained in:
Dwayne Robinson 2020-07-17 08:04:05 +00:00
parent 42a5a4bff1
commit 1154b6e579

View file

@ -633,7 +633,7 @@ public:
{
int dimIndex = axes.empty() ? i : axes[i];
int stride = steps.empty() ? 1 : steps[i];
ML_CHECK_VALID_ARGUMENT(dimIndex < inputDimensions.size(), "'axes' must be valid with within actual input dimensions.");
ML_CHECK_VALID_ARGUMENT(static_cast<size_t>(dimIndex) < static_cast<size_t>(inputDimensions.size()), "'axes' must be valid with within actual input dimensions.");
ML_CHECK_VALID_ARGUMENT(stride != 0, "'steps' must not be 0.");
// Positive values are offsets from 0.