Browse Source

Fix for compile error with JUCE_ALLOW_STATIC_NULL_VARIABLES=0

tags/2021-05-28
jules 7 years ago
parent
commit
d4762f1d9a
19 changed files with 25 additions and 29 deletions
  1. +2
    -2
      examples/DemoRunner/DemoRunner.jucer
  2. +1
    -1
      examples/DemoRunner/JuceLibraryCode/AppConfig.h
  3. +1
    -1
      extras/Projucer/JuceLibraryCode/AppConfig.h
  4. +2
    -2
      extras/Projucer/Projucer.jucer
  5. +1
    -1
      modules/juce_core/containers/juce_Variant.cpp
  6. +1
    -1
      modules/juce_core/containers/juce_Variant.h
  7. +1
    -1
      modules/juce_core/files/juce_File.cpp
  8. +3
    -3
      modules/juce_core/files/juce_File.h
  9. +2
    -4
      modules/juce_core/native/juce_posix_SharedCode.h
  10. +2
    -4
      modules/juce_core/native/juce_win32_Files.cpp
  11. +1
    -1
      modules/juce_core/system/juce_PlatformDefs.h
  12. +1
    -1
      modules/juce_core/text/juce_String.cpp
  13. +1
    -1
      modules/juce_core/text/juce_String.h
  14. +1
    -1
      modules/juce_data_structures/values/juce_ValueTree.cpp
  15. +1
    -1
      modules/juce_data_structures/values/juce_ValueTree.h
  16. +1
    -1
      modules/juce_graphics/geometry/juce_AffineTransform.cpp
  17. +1
    -1
      modules/juce_graphics/geometry/juce_AffineTransform.h
  18. +1
    -1
      modules/juce_graphics/images/juce_Image.cpp
  19. +1
    -1
      modules/juce_graphics/images/juce_Image.h

+ 2
- 2
examples/DemoRunner/DemoRunner.jucer View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<JUCERPROJECT name="DemoRunner" projectType="guiapp" jucerVersion="5.3.1" defines="JUCE_DEMO_RUNNER=1&#10;JUCE_UNIT_TESTS=1"
<JUCERPROJECT name="DemoRunner" projectType="guiapp" jucerVersion="5.3.2" defines="JUCE_DEMO_RUNNER=1&#10;JUCE_UNIT_TESTS=1"
bundleIdentifier="com.juce.demorunner" version="5.3.2" companyName="ROLI Ltd."
companyCopyright="Copyright (c) 2018 - ROLI Ltd." companyWebsite="https://www.juce.com/"
companyEmail="info@juce.com" id="yj7xMM" reportAppUsage="1">
@@ -258,7 +258,7 @@
useGlobalPath="0"/>
<MODULE id="juce_video" showAllCode="1" useLocalCopy="0" useGlobalPath="0"/>
</MODULES>
<JUCEOPTIONS JUCE_USE_CAMERA="1" JUCE_USE_MP3AUDIOFORMAT="1"/>
<JUCEOPTIONS JUCE_USE_CAMERA="1" JUCE_USE_MP3AUDIOFORMAT="1" JUCE_ALLOW_STATIC_NULL_VARIABLES="0"/>
<LIVE_SETTINGS>
<OSX/>
</LIVE_SETTINGS>


+ 1
- 1
examples/DemoRunner/JuceLibraryCode/AppConfig.h View File

@@ -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
//==============================================================================


+ 1
- 1
extras/Projucer/JuceLibraryCode/AppConfig.h View File

@@ -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
//==============================================================================


+ 2
- 2
extras/Projucer/Projucer.jucer View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<JUCERPROJECT id="M70qfTRRk" name="Projucer" projectType="guiapp" juceFolder="../../juce"
jucerVersion="5.3.1" version="5.3.2" bundleIdentifier="com.juce.theprojucer"
jucerVersion="5.3.2" version="5.3.2" bundleIdentifier="com.juce.theprojucer"
defines="" splashScreenColour="Dark" displaySplashScreen="0"
reportAppUsage="0" companyName="ROLI Ltd." companyCopyright="ROLI Ltd."
cppLanguageStandard="11">
@@ -717,7 +717,7 @@
resource="0" file="Source/Wizards/jucer_TemplateThumbnailsComponent.h"/>
</GROUP>
</MAINGROUP>
<JUCEOPTIONS JUCE_LOG_ASSERTIONS="1" JUCE_USE_CURL="1"/>
<JUCEOPTIONS JUCE_LOG_ASSERTIONS="1" JUCE_USE_CURL="1" JUCE_ALLOW_STATIC_NULL_VARIABLES="0"/>
<MODULES>
<MODULE id="juce_analytics" showAllCode="1" useLocalCopy="0" useGlobalPath="0"/>
<MODULE id="juce_core" showAllCode="1"/>


+ 1
- 1
modules/juce_core/containers/juce_Variant.cpp View File

@@ -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)


+ 1
- 1
modules/juce_core/containers/juce_Variant.h View File

@@ -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:
//==============================================================================


+ 1
- 1
modules/juce_core/files/juce_File.cpp View File

@@ -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)


+ 3
- 3
modules/juce_core/files/juce_File.h View File

@@ -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:
//==============================================================================


+ 2
- 4
modules/juce_core/native/juce_posix_SharedCode.h View File

@@ -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 "/"; }


+ 2
- 4
modules/juce_core/native/juce_win32_Files.cpp View File

@@ -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 "\\"; }


+ 1
- 1
modules/juce_core/system/juce_PlatformDefs.h View File

@@ -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) \


+ 1
- 1
modules/juce_core/text/juce_String.cpp View File

@@ -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))


+ 1
- 1
modules/juce_core/text/juce_String.h View File

@@ -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:
//==============================================================================


+ 1
- 1
modules/juce_data_structures/values/juce_ValueTree.cpp View File

@@ -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))
{


+ 1
- 1
modules/juce_data_structures/values/juce_ValueTree.h View File

@@ -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:
//==============================================================================


+ 1
- 1
modules/juce_graphics/geometry/juce_AffineTransform.cpp View File

@@ -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


+ 1
- 1
modules/juce_graphics/geometry/juce_AffineTransform.h View File

@@ -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:


+ 1
- 1
modules/juce_graphics/images/juce_Image.cpp View File

@@ -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; }


+ 1
- 1
modules/juce_graphics/images/juce_Image.h View File

@@ -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:
//==============================================================================


Loading…
Cancel
Save