Introjucer fails to build / numElementsInArray

With last tip on OS X 10.6 / LLVM Compiler 1.7 / “The Introjucer” fails to build.

jucer_ProjectExport_XCode.h:1281: error: no matching function for call to 'numElementsInArray(const XCodeProjectExporter::getiOSAppIconContents() const::ImageType [10])' jucer_ProjectExport_XCode.h:1311: error: no matching function for call to 'numElementsInArray(const XCodeProjectExporter::getiOSLaunchImageContents() const::ImageType [6])'

Probably since that commit:

There are limits to the effort I can afford to put in to work around bugs in defunct versions of GCC..

As mentioned in some other threads, you really should be building on a later version than 10.6 now, even if you need the backwards-compatibility, because pretty soon those old builds will start failing on new versions of OSX because the old SDKs use functions that won't be supported any more. The newer compilers also generate much better code.

This one's pretty easy to fix - presumably this would work?

        for (size_t i = 0; i < sizeof (types) / sizeof (types[0]); ++i)

..but it's annoying to have to replace perfectly good code with hacks like this just because people are still using ancient compilers!

For now, i cannot upgrade my system. That doesn’t matter I’ll just freeze JUCE on my machine until i finish to port my work to GNU/LInux. Thanks for the trick that do the job well.