OS X 10.6 support survey


#62

OK I just hit another example of why juce::make_unique() would be really useful…

You can’t do this with unique_ptr without some kind of make_unique(), at least as far as I can tell.

if (ScopedPointer<XmlElement> state = deviceManager.createStateXml())
{
    // do something with the temporary XmlElement 
}

#63

We’ve not yet introduced any features from the newer standard library, but we’ll do so shortly.


#64

I’m doing this in a constructor for a shader renderer:

VertCosShader::VertCosShader(ShaderRenderer& renderer, float rate) :
Shader(
       ScopedPointer<FileInputStream>(File::getSpecialLocation(File::SpecialLocationType::currentApplicationFile)
                                      .getChildFile("Contents")
                                      .getChildFile("Resources")
                                      .getChildFile("vertCosFragment.shad").createInputStream())->readEntireStreamAsString(),
       ScopedPointer<FileInputStream>(File::getSpecialLocation(File::SpecialLocationType::currentApplicationFile)
                                      .getChildFile("Contents")
                                      .getChildFile("Resources")
                                      .getChildFile("vertCosVertex.shad").createInputStream())->readEntireStreamAsString(),
    renderer)
{
    this->rate = rate;
    Random r;
    topColor = Colour((uint8)r.nextInt({10, 255}),
                      (uint8)r.nextInt({10, 255}),
                      (uint8)r.nextInt({10, 255}),
                      (uint8)255);
    botColor = Colour((uint8)r.nextInt({10, 255}),
                      (uint8)r.nextInt({10, 255}),
                      (uint8)r.nextInt({10, 255}),
                      (uint8)255);
}

it works rad! obviously, it assumes the file exists, tho…


#65

I’m slow responding to this thread, but anyway:

I have a survey that a sizable proportion of my customers fill out. Right now, 10.6.8 is used by 1.53% of my users. To put things in perspective, OSX is about 70% of my users, and Windows is at 30%.

XP is at 0.51% of my users, if anyone cares, and Vista is at 0.08%.


#66

This will be a nightmare for me… my projects make heavy use of ScopedPointer, so unless I write my own wrapper class I can see much unforeseen code maintenance on the horizon :frowning:


#67

Like I said above, we won’t remove ScopedPointer any time soon. We’ll stop using it ourselves and encourage you to stop too, but there’d be no sense in breaking anyone’s builds by removing it.


#68

How about Atomic?
Better to use std::atomic instead?

Thank you.


#69

Yep.


#70

Since removing 10.6 support Atomic is just a thin wrapper around std::atomic anyway. Using the latter directly gives you much more control over how you interact with C++'s memory model.