Fix various warnings from MSVC / GCC

nix
Owen Green 5 years ago
parent 3e31a4dcb4
commit 1fc8b2a3da

@ -39,7 +39,7 @@ namespace client {
{
return allocSizeImpl(std::forward<decltype(t)>(t),
std::index_sequence_for<Ts...>());
};
}
template <typename... Ts, size_t... Is>
static std::tuple<std::array<index, sizeof...(Ts)>, index>
@ -53,11 +53,11 @@ namespace client {
return std::make_tuple(res,
size); // array of offsets into allocated buffer &
// total number of floats to alloc
};
}
static void convert(float* f, typename BufferT::type buf)
{
f[0] = static_cast<SCBufferAdaptor*>(buf.get())->bufnum();
f[0] = static_cast<float>(static_cast<SCBufferAdaptor*>(buf.get())->bufnum());
}
template <typename T>
@ -129,8 +129,7 @@ namespace client {
static index numTags(std::tuple<Ts...>&&)
{
return std::tuple_size<std::tuple<Ts...>>::value;
};
}
static void getTag(Packet& p, typename BufferT::type) { p.addtag('i'); }
@ -161,21 +160,21 @@ namespace client {
static void convert(Packet& p, typename BufferT::type buf)
{
p.addi(static_cast<SCBufferAdaptor*>(buf.get())->bufnum());
p.addi(static_cast<int>(static_cast<SCBufferAdaptor*>(buf.get())->bufnum()));
}
template <typename T>
static std::enable_if_t<std::is_integral<T>::value>
convert(Packet& p, T x)
{
p.addi(x);
p.addi(static_cast<int>(x));
}
template <typename T>
static std::enable_if_t<std::is_floating_point<T>::value>
convert(Packet& p, T x)
{
p.addf(x);
p.addf(static_cast<float>(x));
}
static void convert(Packet& p, std::string s)

@ -125,22 +125,17 @@ namespace impl{
void next(SCUnit& unit, Client& client,Params& params,FloatControlsIter& controls)
{
bool trig = IsModel_t<Client>::value ? !mPrevTrig && unit.in0(0) > 0 : false;
bool shouldProcess = IsModel_t<Client>::value ? trig : true;
mPrevTrig = trig;
// if(shouldProcess)
// {
// controls.reset(unit.mInBuf + unit.mSpecialIndex + 1);
Wrapper::setParams(&unit, params, controls);
params.constrainParameterValues();
// }
Wrapper::setParams(&unit, params, controls);
params.constrainParameterValues();
for (index i = 0; i < client.audioChannelsIn(); ++i)
{
assert(i <= std::numeric_limits<int>::max());
if (mInputConnections[asUnsigned(i)])
mAudioInputs[asUnsigned(i)].reset(const_cast<float*>(unit.in(static_cast<int>(i))), 0,
unit.fullBufferSize());
mAudioInputs[asUnsigned(i)].reset(const_cast<float*>(unit.in(static_cast<int>(i))), 0,unit.fullBufferSize());
}
for (index i = 0; i < client.audioChannelsOut(); ++i)

Loading…
Cancel
Save