I made some general improvements to reduce the compiler warnings (compiling nativly on Linux). Please find them on http://code.google.com/r/tilopruetz-cocotron/source/detail?r=1fda3d1453a6fe6a08595934c0148a32623c84f2.
BTW: Isn't there a better way to do pull requests? On GitHub one can easily select a branch and click on 'pull request' to do this and then a task is automatically opened for the maintainers with the ability to discuss the request in general or even single lines of changes. Not to mention that the overview of the changes to pull is handy.
Nevertheless I do not think I could improve some code which I cannot even read.
- I will continue separating formatting and logical changes.
- I will reduce my formatting changes to pure whitespace changes that are:- remove trainling whitespaces in whole files- fix indentation in function to be changed- maybe more space-fixes (like 'for( int i;i<j;i++){' → 'for (int i; i < j; i++) {') in _lines_ to be changed
- I will only add curly braces or change line breaks in blocks I change and do these changes in the logical change commit.
As a result of this the reformatting commits should be totally empty with 'diff -w' and all other changes should be of low impact.
NSNumber *kNSNumberTrue;
NSNumber *kNSNumberFalse;
const CFBooleanRef kCFBooleanTrue = (CFBooleanRef)&kNSNumberTrue;
const CFBooleanRef kCFBooleanFalse = (CFBooleanRef)&kNSNumberFalse;
Hi Tilo,The new constants you introduced in d1cffdeda259 don't work:e.g.NSNumber *kNSNumberTrue;
NSNumber *kNSNumberFalse;
const CFBooleanRef kCFBooleanTrue = (CFBooleanRef)&kNSNumberTrue;
const CFBooleanRef kCFBooleanFalse = (CFBooleanRef)&kNSNumberFalse;
This doesn't work because a CFBooleanRef is pointer to an instance and you're initializing it with a pointer to a pointer to an instance, and you can't initialize them in +initialize because they're const's.This change should probably be reverted and the old system made to work with clang, it was basically how Apple is doing it. The constants also need to be valid before +initialize .
Okay, I will do so.IMHO the whole CoreFoundation thing was one of the worst ideas Apple ever had (regarding the Foundation). They didn't even get it right by themselves and now we have to live with such a crap.
Hi Tilo,The new constants you introduced in d1cffdeda259 don't work: