DPF

DISTRHO Plugin Framework
Log | Files | Refs | Submodules | README | LICENSE

commit 8f478f979f70b837a70259b1123da7162cbae35b
parent 1adef358f4bfcf9b8eb8afcaf560cd6ad6db84f8
Author: falkTX <falktx@falktx.com>
Date:   Sun, 19 Sep 2021 13:16:27 +0100

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

Signed-off-by: falkTX <falktx@falktx.com>

Diffstat:
Mdgl/NanoVG.hpp | 3++-
Mdistrho/src/DistrhoPluginInternal.hpp | 2+-
Mdistrho/src/DistrhoUILV2.cpp | 6++++--
3 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/dgl/NanoVG.hpp b/dgl/NanoVG.hpp @@ -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 diff --git a/distrho/src/DistrhoPluginInternal.hpp b/distrho/src/DistrhoPluginInternal.hpp @@ -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; diff --git a/distrho/src/DistrhoUILV2.cpp b/distrho/src/DistrhoUILV2.cpp @@ -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