Skip to content

Commit

Permalink
fix: implicit type conversion warnings (#112)
Browse files Browse the repository at this point in the history
  • Loading branch information
0ax1 authored Sep 9, 2023
1 parent c955b3e commit af6cd3d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/detail/vst3/process.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ namespace Clap
_silent_output = new float[numSamples];
}

auto numInputs = _audioinputs->size();
auto numOutputs = _audiooutputs->size();
auto numInputs = (uint32_t)_audioinputs->size();
auto numOutputs = (uint32_t)_audiooutputs->size();

_processData.audio_inputs_count = numInputs;
delete[] _input_ports;
Expand Down Expand Up @@ -412,7 +412,7 @@ namespace Clap
uint32_t ProcessAdapter::input_events_size(const struct clap_input_events* list)
{
auto self = static_cast<ProcessAdapter*>(list->ctx);
return self->_events.size();
return (uint32_t)self->_events.size();
// return self->_vstdata->inputEvents->getEventCount();
}

Expand Down
4 changes: 2 additions & 2 deletions src/detail/vst3/state.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ class CLAPVST3StreamAdapter
{
auto self = static_cast<CLAPVST3StreamAdapter*>(stream->ctx);
Steinberg::int32 bytesRead = 0;
if (kResultOk == self->vst_stream->read(buffer, size, &bytesRead))
if (kResultOk == self->vst_stream->read(buffer, (int32)size, &bytesRead))
return bytesRead;
return -1;
}
static int64_t write(const struct clap_ostream* stream, const void* buffer, uint64_t size)
{
auto self = static_cast<CLAPVST3StreamAdapter*>(stream->ctx);
Steinberg::int32 bytesWritten = 0;
if (kResultOk == self->vst_stream->write(const_cast<void*>(buffer), size, &bytesWritten))
if (kResultOk == self->vst_stream->write(const_cast<void*>(buffer), (int32)size, &bytesWritten))
return bytesWritten;
return -1;
}
Expand Down

0 comments on commit af6cd3d

Please sign in to comment.