Dirk Reiners wrote:
> Hi Marcus,
>
> On Thu, 2006-02-16 at 17:24 +0100, Marcus Lindblom wrote:
>> I forgot that, in order to make this work, you need some to force the
>> evaluation of this. You could include something like the following, to
>> check it from every file during app-startup (pre-main).
>>
>> struct CheckRuntimeConfig{
>> CheckRuntimeConfig() { checkRuntimeConfig(runtimeConfig()); }
>> };
>> static CheckRuntimeConfig CheckRuntimeConfig_Instance;
>>
>> Or just do something this to check it when intializing:
>>
>> inline void osginit(...)
>> {
>> checkRuntimeConfig(runtimeConfig());
>> osginitimpl(...);
>> }
>
> Will that always work in debug mode? AFAIUI compilers don't have to
> inline stuff in debug mode, so if this is turned into a regular function
> it would be compiled into the lib.
>
> Can anybody comment on this?I tried testing this with VR Juggler 2.1 a couple of hours ago, and it does not work in debug mode. I couldn't figure out why, but I suspected that inlining (or lack thereof) was playing a role. It works like a charm in release mode. -Patrick -- Patrick L. Hartling | VP Engineering, Infiscape Corp. PGP: http://tinyurl.com/2msw3 | http://www.infiscape.com/
signature.asc
Description: OpenPGP digital signature
