Howdy,I'm aware of some of the violations, actually. I was getting frustrated and just ran through the code trying to find issues rather than being all proper :-0 I'll address those soon.
I just copied the way it was done in app_server for DECORATORS_DIR, but that urked me as well - just couldn't be bothered with it while dealing with odd results through ServerLink ( it doesn't like entry_refs, no way no how... so I hade to change to ReadString and AttachString and do some serious rewriting - which resolved all of the issues ).
As far as checking against non-NULL I tend to do this when it keeps the code flowing more cleanly, though if that is an issue I'll run through and change it up.
And I always align everything for their purpose, but I'll undo that before finalization as well.
Thanks! --The loon On 4/13/2011 12:33, Michael Pfeiffer wrote:
Am 13.04.2011 um 09:47 schrieb Joseph Groover:ALL opinions wanted!There are some code style violations. See [1] for details. For example: * no spaces around a condition: if (condition) instead of if ( condition ) * opening curly bracket on same line after conditional statement: if (condition) { ... * I think it is preferred to explicitly test against NULL or 0: point == NULL or point != NULL instead of !pointer or pointer strcmp(...) != 0 instead of !strcmp(...) * The * belongs to the type: DecorAddOn* name instead of DecorAddOn * name * Local variable names are not aligned: DecorAddOn* old_decor = fCurrentDecor; BString old_path = fCurrentDecorPath; image_idold_image = fCurrentDecor->ImageID(); instead of: DecorAddOn * old_decor = fCurrentDecor; BString old_path = fCurrentDecorPath; image_id old_image = fCurrentDecor->ImageID(); * I think we don't use underscores in variable names oldDecor instead of old_decor * use find_directory with B_USER_ADDONS_DIRECTORY instead of the hard coded path in: #define DECORATORS_DIR "/boot/home/config/add-ons/decorators/" Bye, Michael [1] http://www.haiku-os.org/development/coding-guidelines