On 22.08.2012 03:48, Alex Rousskov wrote:
On 08/21/2012 09:26 AM, Kinkie wrote:
On Tue, Aug 21, 2012 at 4:47 PM, Alex Rousskov
wrote:
On 08/21/2012 12:19 AM, Kinkie wrote:
.h file:
#if OPTIONAL_FEATURE
extern void someFunction();
#else
// #define someFunction() // NOP
// or:
// static inline
On 08/21/2012 09:26 AM, Kinkie wrote:
> On Tue, Aug 21, 2012 at 4:47 PM, Alex Rousskov
> wrote:
>> On 08/21/2012 12:19 AM, Kinkie wrote:
.h file:
> #if OPTIONAL_FEATURE
> extern void someFunction();
> #else
> // #define someFunction() // NOP
> // or:
> // static inline
On Tue, Aug 21, 2012 at 4:47 PM, Alex Rousskov
wrote:
> On 08/21/2012 12:19 AM, Kinkie wrote:
>>> .h file:
>>> > #if OPTIONAL_FEATURE
>>> > extern void someFunction();
>>> > #else
>>> > // #define someFunction() // NOP
>>> > // or:
>>> > // static inline someFunction() {/* NOP */}
>>> >
>>> > #end
On 08/21/2012 12:19 AM, Kinkie wrote:
>> .h file:
>> > #if OPTIONAL_FEATURE
>> > extern void someFunction();
>> > #else
>> > // #define someFunction() // NOP
>> > // or:
>> > // static inline someFunction() {/* NOP */}
>> >
>> > #endif
>> >
>> > .cc file:
>> > #if OPTIONAL_FEATURE
>> > void someFun
On 21/08/2012 6:24 p.m., Kinkie wrote:
If any, I'd go for static inline (or just inline, after all the
namespace is already polluted).
Is the cost of the extra function call worth the decreased readibility?
To be clearer: I'm thinking about how this would interact e.g. with
Doxygen documentation
> If any, I'd go for static inline (or just inline, after all the
> namespace is already polluted).
> Is the cost of the extra function call worth the decreased readibility?
To be clearer: I'm thinking about how this would interact e.g. with
Doxygen documentation.
--
/kinkie
On Tue, Aug 21, 2012 at 7:36 AM, Amos Jeffries wrote:
> On 21/08/2012 5:08 p.m., Kinkie wrote:
>>
>> Hi all,
>>as I'm refactoring things around (currently hacking protos.h to
>> pieces), I often encounter constructs such as:
>>
>> .h file:
>> #if OPTIONAL_FEATURE
>> extern void someFunction();
On 21/08/2012 5:08 p.m., Kinkie wrote:
Hi all,
as I'm refactoring things around (currently hacking protos.h to
pieces), I often encounter constructs such as:
.h file:
#if OPTIONAL_FEATURE
extern void someFunction();
#endif
.cc file:
#if OPTIONAL_FEATURE
void someFunction() {
//code
}
#end
Hi all,
as I'm refactoring things around (currently hacking protos.h to
pieces), I often encounter constructs such as:
.h file:
#if OPTIONAL_FEATURE
extern void someFunction();
#endif
.cc file:
#if OPTIONAL_FEATURE
void someFunction() {
//code
}
#endif
client code:
#if OPTIONAL_FEATURE
som