diff --git a/examples/DemoRunner/DemoRunner.jucer b/examples/DemoRunner/DemoRunner.jucer index f4729cd8ce..32cb9a43b0 100644 --- a/examples/DemoRunner/DemoRunner.jucer +++ b/examples/DemoRunner/DemoRunner.jucer @@ -1,6 +1,6 @@ - @@ -258,7 +258,7 @@ useGlobalPath="0"/> - + diff --git a/examples/DemoRunner/JuceLibraryCode/AppConfig.h b/examples/DemoRunner/JuceLibraryCode/AppConfig.h index de08905c2f..8312cc5afd 100644 --- a/examples/DemoRunner/JuceLibraryCode/AppConfig.h +++ b/examples/DemoRunner/JuceLibraryCode/AppConfig.h @@ -203,7 +203,7 @@ #endif #ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES - //#define JUCE_ALLOW_STATIC_NULL_VARIABLES 1 + #define JUCE_ALLOW_STATIC_NULL_VARIABLES 0 #endif //============================================================================== diff --git a/extras/Projucer/JuceLibraryCode/AppConfig.h b/extras/Projucer/JuceLibraryCode/AppConfig.h index 1846127fb2..be68fba614 100644 --- a/extras/Projucer/JuceLibraryCode/AppConfig.h +++ b/extras/Projucer/JuceLibraryCode/AppConfig.h @@ -108,7 +108,7 @@ #endif #ifndef JUCE_ALLOW_STATIC_NULL_VARIABLES - //#define JUCE_ALLOW_STATIC_NULL_VARIABLES 1 + #define JUCE_ALLOW_STATIC_NULL_VARIABLES 0 #endif //============================================================================== diff --git a/extras/Projucer/Projucer.jucer b/extras/Projucer/Projucer.jucer index 9444f7102f..bc95b51087 100644 --- a/extras/Projucer/Projucer.jucer +++ b/extras/Projucer/Projucer.jucer @@ -1,7 +1,7 @@ @@ -717,7 +717,7 @@ resource="0" file="Source/Wizards/jucer_TemplateThumbnailsComponent.h"/> - + diff --git a/modules/juce_core/containers/juce_Variant.cpp b/modules/juce_core/containers/juce_Variant.cpp index 43b8180ddc..4818cf7966 100644 --- a/modules/juce_core/containers/juce_Variant.cpp +++ b/modules/juce_core/containers/juce_Variant.cpp @@ -435,7 +435,7 @@ var::var() noexcept : type (&VariantType_Void::instance) {} var::var (const VariantType& t) noexcept : type (&t) {} var::~var() noexcept { type->cleanUp (value); } -JUCE_DECLARE_DEPRECATED_STATIC (const var var::null); +JUCE_DECLARE_DEPRECATED_STATIC (const var var::null;) //============================================================================== var::var (const var& valueToCopy) : type (valueToCopy.type) diff --git a/modules/juce_core/containers/juce_Variant.h b/modules/juce_core/containers/juce_Variant.h index 975c6781f0..a50118c8ec 100644 --- a/modules/juce_core/containers/juce_Variant.h +++ b/modules/juce_core/containers/juce_Variant.h @@ -282,7 +282,7 @@ public: empty var from a function by reference, but if you need to do that, it's easy enough to use a function-local static var and return that, avoiding any order-of-initialisation issues. */ - JUCE_DEPRECATED_STATIC (static const var null); + JUCE_DEPRECATED_STATIC (static const var null;) private: //============================================================================== diff --git a/modules/juce_core/files/juce_File.cpp b/modules/juce_core/files/juce_File.cpp index 1bf3258964..6d0b44c92b 100644 --- a/modules/juce_core/files/juce_File.cpp +++ b/modules/juce_core/files/juce_File.cpp @@ -63,7 +63,7 @@ File& File::operator= (File&& other) noexcept return *this; } -JUCE_DECLARE_DEPRECATED_STATIC (const File File::nonexistent); +JUCE_DECLARE_DEPRECATED_STATIC (const File File::nonexistent;) //============================================================================== static String removeEllipsis (const String& path) diff --git a/modules/juce_core/files/juce_File.h b/modules/juce_core/files/juce_File.h index 5c11921964..12a6ad799f 100644 --- a/modules/juce_core/files/juce_File.h +++ b/modules/juce_core/files/juce_File.h @@ -1053,9 +1053,9 @@ public: Use File::getSeparatorChar() and File::getSeparatorString(), and instead of File::nonexistent, just use File() or {}. */ - JUCE_DEPRECATED_STATIC (static const juce_wchar separator); - JUCE_DEPRECATED_STATIC (static const StringRef separatorString); - JUCE_DEPRECATED_STATIC (static const File nonexistent); + JUCE_DEPRECATED_STATIC (static const juce_wchar separator;) + JUCE_DEPRECATED_STATIC (static const StringRef separatorString;) + JUCE_DEPRECATED_STATIC (static const File nonexistent;) private: //============================================================================== diff --git a/modules/juce_core/native/juce_posix_SharedCode.h b/modules/juce_core/native/juce_posix_SharedCode.h index b10a127938..ce89f5ffe8 100644 --- a/modules/juce_core/native/juce_posix_SharedCode.h +++ b/modules/juce_core/native/juce_posix_SharedCode.h @@ -188,10 +188,8 @@ static MaxNumFileHandlesInitialiser maxNumFileHandlesInitialiser; #endif //============================================================================== -#ifndef JUCE_GCC - const juce_wchar File::separator = '/'; - const StringRef File::separatorString ("/"); -#endif +JUCE_DECLARE_DEPRECATED_STATIC (const juce_wchar File::separator = '/';) +JUCE_DECLARE_DEPRECATED_STATIC (const StringRef File::separatorString ("/");) juce_wchar File::getSeparatorChar() { return '/'; } StringRef File::getSeparatorString() { return "/"; } diff --git a/modules/juce_core/native/juce_win32_Files.cpp b/modules/juce_core/native/juce_win32_Files.cpp index 85e7f27a95..76ebcee0e1 100644 --- a/modules/juce_core/native/juce_win32_Files.cpp +++ b/modules/juce_core/native/juce_win32_Files.cpp @@ -158,10 +158,8 @@ namespace WindowsFileHelpers } //============================================================================== -#ifndef JUCE_GCC - const juce_wchar File::separator = '\\'; - const StringRef File::separatorString ("\\"); -#endif +JUCE_DECLARE_DEPRECATED_STATIC (const juce_wchar File::separator = '\\';) +JUCE_DECLARE_DEPRECATED_STATIC (const StringRef File::separatorString ("\\");) juce_wchar File::getSeparatorChar() { return '\\'; } StringRef File::getSeparatorString() { return "\\"; } diff --git a/modules/juce_core/system/juce_PlatformDefs.h b/modules/juce_core/system/juce_PlatformDefs.h index 0666bccf3e..995c2e8113 100644 --- a/modules/juce_core/system/juce_PlatformDefs.h +++ b/modules/juce_core/system/juce_PlatformDefs.h @@ -275,7 +275,7 @@ namespace juce #if JUCE_ALLOW_STATIC_NULL_VARIABLES #if ! (defined (DOXYGEN) || defined (JUCE_GCC) || (JUCE_MSVC && _MSC_VER <= 1900)) - #define JUCE_DEPRECATED_STATIC(valueDef) JUCE_DEPRECATED (valueDef) + #define JUCE_DEPRECATED_STATIC(valueDef) JUCE_DEPRECATED_ATTRIBUTE valueDef #if JUCE_MSVC #define JUCE_DECLARE_DEPRECATED_STATIC(valueDef) \ diff --git a/modules/juce_core/text/juce_String.cpp b/modules/juce_core/text/juce_String.cpp index 88d530aec5..5b52e8e4b7 100644 --- a/modules/juce_core/text/juce_String.cpp +++ b/modules/juce_core/text/juce_String.cpp @@ -235,7 +235,7 @@ private: } }; -JUCE_DECLARE_DEPRECATED_STATIC (const String String::empty); +JUCE_DECLARE_DEPRECATED_STATIC (const String String::empty;) //============================================================================== String::String() noexcept : text (&(emptyString.text)) diff --git a/modules/juce_core/text/juce_String.h b/modules/juce_core/text/juce_String.h index a778be1ce5..13686eb0d6 100644 --- a/modules/juce_core/text/juce_String.h +++ b/modules/juce_core/text/juce_String.h @@ -1247,7 +1247,7 @@ public: empty string from a function by reference, but if you need to do that, it's easy enough to use a function-local static String object and return that, avoiding any order-of-initialisation issues. */ - JUCE_DEPRECATED_STATIC (static const String empty); + JUCE_DEPRECATED_STATIC (static const String empty;) private: //============================================================================== diff --git a/modules/juce_data_structures/values/juce_ValueTree.cpp b/modules/juce_data_structures/values/juce_ValueTree.cpp index e40410d93f..90602687eb 100644 --- a/modules/juce_data_structures/values/juce_ValueTree.cpp +++ b/modules/juce_data_structures/values/juce_ValueTree.cpp @@ -579,7 +579,7 @@ ValueTree::ValueTree() noexcept { } -JUCE_DECLARE_DEPRECATED_STATIC (const ValueTree ValueTree::invalid); +JUCE_DECLARE_DEPRECATED_STATIC (const ValueTree ValueTree::invalid;) ValueTree::ValueTree (const Identifier& type) : object (new ValueTree::SharedObject (type)) { diff --git a/modules/juce_data_structures/values/juce_ValueTree.h b/modules/juce_data_structures/values/juce_ValueTree.h index b1cffbdae8..cf3533b93c 100644 --- a/modules/juce_data_structures/values/juce_ValueTree.h +++ b/modules/juce_data_structures/values/juce_ValueTree.h @@ -592,7 +592,7 @@ public: /* An invalid ValueTree that can be used if you need to return one as an error condition, etc. @deprecated If you need an empty ValueTree object, just use ValueTree() or {}. */ - JUCE_DEPRECATED_STATIC (static const ValueTree invalid); + JUCE_DEPRECATED_STATIC (static const ValueTree invalid;) private: //============================================================================== diff --git a/modules/juce_graphics/geometry/juce_AffineTransform.cpp b/modules/juce_graphics/geometry/juce_AffineTransform.cpp index e1c6b3fd55..1b508dad99 100644 --- a/modules/juce_graphics/geometry/juce_AffineTransform.cpp +++ b/modules/juce_graphics/geometry/juce_AffineTransform.cpp @@ -84,7 +84,7 @@ bool AffineTransform::isIdentity() const noexcept && mat11 == 1.0f; } -JUCE_DECLARE_DEPRECATED_STATIC (const AffineTransform AffineTransform::identity); +JUCE_DECLARE_DEPRECATED_STATIC (const AffineTransform AffineTransform::identity;) //============================================================================== AffineTransform AffineTransform::followedBy (const AffineTransform& other) const noexcept diff --git a/modules/juce_graphics/geometry/juce_AffineTransform.h b/modules/juce_graphics/geometry/juce_AffineTransform.h index e7461bc21f..77d747c6a5 100644 --- a/modules/juce_graphics/geometry/juce_AffineTransform.h +++ b/modules/juce_graphics/geometry/juce_AffineTransform.h @@ -273,7 +273,7 @@ public: /* A ready-to-use identity transform - now depracated. @deprecated If you need an identity transform, just use AffineTransform() or {}. */ - JUCE_DEPRECATED_STATIC (static const AffineTransform identity); + JUCE_DEPRECATED_STATIC (static const AffineTransform identity;) //============================================================================== /* The transform matrix is: diff --git a/modules/juce_graphics/images/juce_Image.cpp b/modules/juce_graphics/images/juce_Image.cpp index 6b478349b2..197839dda4 100644 --- a/modules/juce_graphics/images/juce_Image.cpp +++ b/modules/juce_graphics/images/juce_Image.cpp @@ -262,7 +262,7 @@ Image::~Image() { } -JUCE_DECLARE_DEPRECATED_STATIC (const Image Image::null); +JUCE_DECLARE_DEPRECATED_STATIC (const Image Image::null;) int Image::getReferenceCount() const noexcept { return image == nullptr ? 0 : image->getSharedCount(); } int Image::getWidth() const noexcept { return image == nullptr ? 0 : image->width; } diff --git a/modules/juce_graphics/images/juce_Image.h b/modules/juce_graphics/images/juce_Image.h index 74de5addf5..e9c8e83b57 100644 --- a/modules/juce_graphics/images/juce_Image.h +++ b/modules/juce_graphics/images/juce_Image.h @@ -417,7 +417,7 @@ public: /* A null Image object that can be used when you need to return an invalid image. @deprecated If you need a default-constructed var, just use Image() or {}. */ - JUCE_DEPRECATED_STATIC (static const Image null); + JUCE_DEPRECATED_STATIC (static const Image null;) private: //==============================================================================