log library: macro replacement in D
    Victor Nakoryakov 
    nail-mail at mail.ru
       
    Sun Apr  2 03:27:29 PDT 2006
    
    
  
Ben Gardner wrote:
  > I know I could brute force it:
> void LOG(int sev, ...)
> {
>    if ((gl_log_mask & (1 << sev)) == 0)
>       return;
> 
>    ... do printf stuff ...
> }
> 
> But then I lose the efficiency of the macro approach.
No, you would not. When you will compile with -inline I guess such 
trivial function will be inlined.
> Any ideas?
> 
> Thanks,
> Ben
-- 
Victor (aka nail) Nakoryakov
nail-mail<at>mail<dot>ru
Krasnoznamensk, Moscow, Russia
    
    
More information about the Digitalmars-d-learn
mailing list