From c78aacf6389fb862978d4ead01cfc71a3d5f8ca8 Mon Sep 17 00:00:00 2001 From: Oleksii Amplee Date: Mon, 28 Apr 2025 19:32:39 +0300 Subject: [PATCH] Fix MSVC build error C2397 (narrowing conversion) signalsmith-stretch.h(407,29): error C2397: conversion from 'int' to 'size_t' requires a narrowing conversion MSBuild version 17.13.15+18b3035f6 for .NET Framework --- signalsmith-stretch.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/signalsmith-stretch.h b/signalsmith-stretch.h index 65f1b1d..024dcbb 100644 --- a/signalsmith-stretch.h +++ b/signalsmith-stretch.h @@ -8,6 +8,7 @@ #include #include #include +#include #include namespace signalsmith { namespace stretch { @@ -404,7 +405,7 @@ struct SignalsmithStretch { private: bool _splitComputation = false; struct { - size_t samplesSinceLast = -1; + size_t samplesSinceLast = std::numeric_limits::max(); size_t steps = 0; size_t step = 0;