From aca36f17ef09efc5f3ab13fb7267ad56906f3d63 Mon Sep 17 00:00:00 2001 From: Yan Pujante Date: Mon, 30 Mar 2020 08:57:33 -0700 Subject: [PATCH] Minor tweaks for Win10 compilation --- src/cpp/Model.h | 2 +- src/cpp/Plugin.cpp | 2 +- src/cpp/RT/SampleSplitterProcessor.cpp | 2 +- src/cpp/SampleSlice.hpp | 3 +++ 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/cpp/Model.h b/src/cpp/Model.h index 609eae9..54c954c 100644 --- a/src/cpp/Model.h +++ b/src/cpp/Model.h @@ -73,7 +73,7 @@ struct NumSlice int_type fIntValue{}; }; -constexpr auto DEFAULT_NUM_SLICES = NumSlice{16}; +constexpr auto DEFAULT_NUM_SLICES = NumSlice{static_cast(16)}; //------------------------------------------------------------------------ // NumSlicesParamConverter: Number of slices is between 1 and NUM_SLICES diff --git a/src/cpp/Plugin.cpp b/src/cpp/Plugin.cpp index 8ff012f..fc94a63 100644 --- a/src/cpp/Plugin.cpp +++ b/src/cpp/Plugin.cpp @@ -426,7 +426,7 @@ tresult SampleSplitterParameters::handleRTStateUpgrade(NormalizedState const &iD { // we handle number of slices (read it from old state / write to new) auto oldNumSlices = __deprecated_fNumSlices->readFromState(iDeprecatedState); - fNumSlices->writeToState(NumSlice{oldNumSlices}, oNewState); + fNumSlices->writeToState(NumSlice{static_cast(oldNumSlices)}, oNewState); // DLOG_F(INFO, "======>>>>> handleRTStateUpgrade:: upgraded from \n[%s]\n ==> \n[%s]", // iDeprecatedState.toString().c_str(), diff --git a/src/cpp/RT/SampleSplitterProcessor.cpp b/src/cpp/RT/SampleSplitterProcessor.cpp index 011c2b8..eea5d88 100644 --- a/src/cpp/RT/SampleSplitterProcessor.cpp +++ b/src/cpp/RT/SampleSplitterProcessor.cpp @@ -609,7 +609,7 @@ void SampleSplitterProcessor::handlePadSelection() auto padBank = *fState.fPadBank; auto start = padBank * NUM_PADS; - auto end = std::min(start + NUM_PADS, numSlices); + auto end = std::min(start + NUM_PADS, static_cast(numSlices)); if(fState.fPadBank.hasChanged() || fState.fNumSlices.hasChanged()) { diff --git a/src/cpp/SampleSlice.hpp b/src/cpp/SampleSlice.hpp index 178fa00..748c66f 100644 --- a/src/cpp/SampleSlice.hpp +++ b/src/cpp/SampleSlice.hpp @@ -328,6 +328,9 @@ class SampleSlice case ETransition::kRestarting: return iStarting ? ETransition::kRestarting : ETransition::kStopping; } + // not reached + ABORT_F("not reached"); + return ETransition::kNone; } private: