Re: Refactoring a #define definition

2015-07-25 Thread Carl Hoefs
On Jun 25, 2015, at 3:04 AM, Dave d...@looktowindward.com wrote: On 24 Jun 2015, at 18:52, Carl Hoefs newsli...@autonomy.caltech.edu wrote: Or better still, disable the “Refactor Menu Item” if something is selected that it doesn’t handle, seems pointless (and potentially dangerous) to

Re: Refactoring a #define definition

2015-07-25 Thread Quincey Morris
On Jul 25, 2015, at 10:37 , Carl Hoefs newsli...@autonomy.caltech.edu wrote: Effectively, what the compiler does with a #define _is_ a global replace. It’s not, though. Not in general. 1. It’s not global. A #define can be undefined and redefined. 2. It’s not unique. IIRC, the appearance of

matching brace not found

2015-07-25 Thread Jan E. Schotsman
Consider this piece of code: if !track.formatDescriptions.isEmpty { let firstFormatDescription = (track.formatDescriptions as! [CMFormatDescription])[0] let asbd = CMAudioFormatDescriptionGetStreamBasicDescription (firstFormatDescription) numSndChannels += Int(

Re: Refactoring a #define definition

2015-07-25 Thread Michael David Crawford
I find some benefit in refactoring the hard way, without the aid of automated tools. This because having to think harder enables me to understand the code better, maybe find other opportunities for improving it. -- Michael David Crawford, Consulting Software Engineer mdcrawf...@gmail.com