Browse Source

And even more fixes

Signed-off-by: falkTX <falktx@falktx.com>
pull/330/head
falkTX 4 years ago
parent
commit
9aec1687c8
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
3 changed files with 4 additions and 4 deletions
  1. +2
    -2
      dgl/src/WindowPrivateData.cpp
  2. +1
    -1
      distrho/src/DistrhoPluginJACK.cpp
  3. +1
    -1
      distrho/src/DistrhoPluginLV2.cpp

+ 2
- 2
dgl/src/WindowPrivateData.cpp View File

@@ -542,13 +542,13 @@ bool Window::PrivateData::openFileBrowser(const Window::FileBrowserOptions& opti
// set start directory in UTF-16 encoding
std::vector<WCHAR> startDirW;
startDirW.resize(startDir.length() + 1);
if (MultiByteToWideChar(CP_UTF8, 0, startDir.buffer(), -1, startDirW.data(), startDirW.size()))
if (MultiByteToWideChar(CP_UTF8, 0, startDir.buffer(), -1, startDirW.data(), static_cast<int>(startDirW.size())))
ofn.lpstrInitialDir = startDirW.data();

// set title in UTF-16 encoding
std::vector<WCHAR> titleW;
titleW.resize(title.length() + 1);
if (MultiByteToWideChar(CP_UTF8, 0, title.buffer(), -1, titleW.data(), titleW.size()))
if (MultiByteToWideChar(CP_UTF8, 0, title.buffer(), -1, titleW.data(), static_cast<int>(titleW.size())))
ofn.lpstrTitle = titleW.data();

// prepare a buffer to receive the result


+ 1
- 1
distrho/src/DistrhoPluginJACK.cpp View File

@@ -469,7 +469,7 @@ protected:
MidiEvent& midiEvent(midiEvents[midiEventCount++]);

midiEvent.frame = jevent.time;
midiEvent.size = jevent.size;
midiEvent.size = static_cast<uint32_t>(jevent.size);

if (midiEvent.size > MidiEvent::kDataSize)
midiEvent.dataExt = jevent.buffer;


+ 1
- 1
distrho/src/DistrhoPluginLV2.cpp View File

@@ -708,7 +708,7 @@ public:
const String& value(cit->second);

// set msg size (key + value + separator + 2x null terminator)
const size_t msgSize = key.length()+value.length()+3;
const uint32_t msgSize = static_cast<uint32_t>(key.length()+value.length())+3U;

if (sizeof(LV2_Atom_Event) + msgSize > capacity - fEventsOutData.offset)
{


Loading…
Cancel
Save