Skip to content

Commit

Permalink
VST SDK 3.7.12
Browse files Browse the repository at this point in the history
  • Loading branch information
ygrabit committed Jul 26, 2024
1 parent cf18705 commit 151ecde
Show file tree
Hide file tree
Showing 10 changed files with 302 additions and 228 deletions.
5 changes: 0 additions & 5 deletions base/fplatform.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,9 @@
#define SMTG_EXPORT_SYMBOL __declspec (dllexport)
#define SMTG_HIDDEN_SYMBOL

#ifndef _CRT_SECURE_NO_WARNINGS
#define _CRT_SECURE_NO_WARNINGS
#endif

#ifdef _MSC_VER
#pragma warning (disable : 4244) //! @brief warning C4244: Conversion from 'type1' to 'type2', possible loss of data.
#pragma warning (disable : 4250) //! @brief warning C4250: Inheritance via dominance is allowed
#pragma warning (disable : 4996) //! @brief warning C4996: deprecated functions

#pragma warning (3 : 4189) //! @brief warning C4189: local variable is initialized but not referenced
#pragma warning (3 : 4238) //! @brief warning C4238: nonstandard extension used : class rvalue used as lvalue
Expand Down
4 changes: 3 additions & 1 deletion base/fstrdefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,13 @@
#define ENDLINE ENDLINE_A
#endif

#if SMTG_OS_WINDOWS && !defined(__GNUC__) && defined(_MSC_VER) && (_MSC_VER < 1900)
#if SMTG_OS_WINDOWS && !defined(__GNUC__) && defined(_MSC_VER)
#define stricmp _stricmp
#define strnicmp _strnicmp
#if (_MSC_VER < 1900)
#define snprintf _snprintf
#endif
#endif

namespace Steinberg {

Expand Down
10 changes: 4 additions & 6 deletions base/funknown.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -410,12 +410,6 @@ void FUID::toRegistryString (char8* string) const
#endif
}

//------------------------------------------------------------------------
void FUID::print (char8* string, int32 style) const
{
print (style, string, 62);
}

//------------------------------------------------------------------------
void FUID::print (int32 style, char8* string, size_t stringBufferSize) const
{
Expand All @@ -439,22 +433,26 @@ void FUID::print (int32 style, char8* string, size_t stringBufferSize) const
switch (style)
{
case kINLINE_UID:
// length is 60 (with null-terminate)
snprintf (string, stringBufferSize, "INLINE_UID (0x%08X, 0x%08X, 0x%08X, 0x%08X)", l1,
l2, l3, l4);
break;

case kDECLARE_UID:
// length is 61 (with null-terminate)
snprintf (string, stringBufferSize, "DECLARE_UID (0x%08X, 0x%08X, 0x%08X, 0x%08X)", l1,
l2, l3, l4);
break;

case kFUID:
// length is 54 (with null-terminate)
snprintf (string, stringBufferSize, "FUID (0x%08X, 0x%08X, 0x%08X, 0x%08X)", l1, l2, l3,
l4);
break;

case kCLASS_UID:
default:
// length is 78 (with null-terminate)
snprintf (string, stringBufferSize,
"DECLARE_CLASS_IID (Interface, 0x%08X, 0x%08X, 0x%08X, 0x%08X)", l1, l2, l3,
l4);
Expand Down
5 changes: 0 additions & 5 deletions base/funknown.h
Original file line number Diff line number Diff line change
Expand Up @@ -314,11 +314,6 @@ class FUID
\param stringBufferSize is the size of the output string */
void print (int32 style, char8* string = nullptr, size_t stringBufferSize = 0) const;

#if SMTG_CPP17
[[deprecated ("Use the print method with the buffer size")]]
#endif
void print (char8* string = nullptr, int32 style = kINLINE_UID) const;

template <size_t N>
inline explicit FUID (const char (&uid)[N])
{
Expand Down
9 changes: 5 additions & 4 deletions base/fvariant.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

#include "pluginterfaces/base/fstrdefs.h"
#include "pluginterfaces/base/funknown.h"
#include <cstdlib>

//------------------------------------------------------------------------
namespace Steinberg {
Expand Down Expand Up @@ -249,9 +250,9 @@ inline void FVariant::empty ()
if (type & kOwner)
{
if ((type & kString8) && string8)
delete[] string8;
free (const_cast<char8*> (string8)); // should match DELETESTR8
else if ((type & kString16) && string16)
delete[] string16;
free (const_cast<char16*> (string16)); // should match DELETESTR16

else if ((type & kObject) && object)
object->release ();
Expand All @@ -268,14 +269,14 @@ inline FVariant& FVariant::operator= (const FVariant& variant)

if ((type & kString8) && variant.string8)
{
string8 = new char8[strlen (variant.string8) + 1];
string8 = static_cast<char8*> (malloc (strlen (variant.string8) + 1)); // should match NEWSTR8
strcpy (const_cast<char8*> (string8), variant.string8);
type |= kOwner;
}
else if ((type & kString16) && variant.string16)
{
auto len = static_cast<size_t> (strlen16 (variant.string16));
string16 = new char16[len + 1];
string16 = static_cast<char16*> (malloc ((len + 1) * sizeof (char16))); // should match NEWSTR16
char16* tmp = const_cast<char16*> (string16);
memcpy (tmp, variant.string16, len * sizeof (char16));
tmp[len] = 0;
Expand Down
3 changes: 2 additions & 1 deletion vst/ivstcomponent.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//-----------------------------------------------------------------------------
// This file is part of a Steinberg SDK. It is subject to the license terms
// in the LICENSE file found in the top-level directory of this distribution
// and at www.steinberg.net/sdklicenses.
// and at www.steinberg.net/sdklicenses.
// No part of the SDK, including this file, may be copied, modified, propagated,
// or distributed except according to the terms contained in the LICENSE file.
//-----------------------------------------------------------------------------
Expand All @@ -23,6 +23,7 @@
#include "pluginterfaces/base/falignpush.h"
//------------------------------------------------------------------------

//------------------------------------------------------------------------
namespace Steinberg {
class IBStream;

Expand Down
Loading

0 comments on commit 151ecde

Please sign in to comment.