Browse Source

Yet a few more compiler warning fixes, msvc stuff this time

Signed-off-by: falkTX <falktx@falktx.com>
pull/330/head
falkTX 3 years ago
parent
commit
8f478f979f
3 changed files with 7 additions and 4 deletions
  1. +2
    -1
      dgl/NanoVG.hpp
  2. +1
    -1
      distrho/src/DistrhoPluginInternal.hpp
  3. +4
    -2
      distrho/src/DistrhoUILV2.cpp

+ 2
- 1
dgl/NanoVG.hpp View File

@@ -24,6 +24,7 @@
#include "StandaloneWindow.hpp"

#ifdef _MSC_VER
# pragma warning(push)
# pragma warning(disable:4661) /* instantiated template classes whose methods are defined elsewhere */
#endif

@@ -969,7 +970,7 @@ typedef NanoSubWidget NanoWidget;
END_NAMESPACE_DGL

#ifdef _MSC_VER
# pragma warning(enable:4661)
# pragma warning(pop)
#endif

#endif // DGL_NANO_WIDGET_HPP_INCLUDED

+ 1
- 1
distrho/src/DistrhoPluginInternal.hpp View File

@@ -355,7 +355,7 @@ public:

portGroupIndices.erase(kPortGroupNone);

if (const uint32_t portGroupSize = portGroupIndices.size())
if (const uint32_t portGroupSize = static_cast<uint32_t>(portGroupIndices.size()))
{
fData->portGroups = new PortGroupWithId[portGroupSize];
fData->portGroupCount = portGroupSize;


+ 4
- 2
distrho/src/DistrhoUILV2.cpp View File

@@ -285,11 +285,13 @@ protected:
tmpStr[std::strlen(key)] = '\0';

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

// reserve atom space
const size_t atomSize = sizeof(LV2_Atom) + msgSize;
const uint32_t atomSize = sizeof(LV2_Atom) + msgSize;
char* const atomBuf = (char*)malloc(atomSize);
DISTRHO_SAFE_ASSERT_RETURN(atomBuf != nullptr,);

std::memset(atomBuf, 0, atomSize);

// set atom info


Loading…
Cancel
Save