According to Marcel Bosc:
> During the re-compile on htdig, I found 2 bugs in htsearch/Display.cc
> (that generated compile warnings and errors)
> * htsearch/Display.cc (setVariables): parentheses missing around ternary
> operator : confusion in priority with <<.
That was one of mine. I didn't realise that << took precedence over
the ternary ? : operator. I was treating it as equivalent to = or +=
in semantics, and therefore in precedence. Thanks for the heads up.
I never got any warnings when I compiled, but I must confess I didn't
test the feature.
> * htsearch/Display.cc (hilight): changed static char * (!!) to const string,
> static char evaluated before configuration is loaded so config had no
> effect + unnecesary conversion
Are you sure about this? The code has lots of instances of statements
like this one:
static int maximum_word_length = config.Value("maximum_word_length", 12);
which seem to work fine. My understanding is the compiler will genrate
code to initialise these once (and only once) at run time, when the
function is first called. If it works for int, why not for char *,
or String? Can anyone else with more C++ experience than me explain
what really goes on behind the scenes with constructs like above?
Am I out to lunch on this? Is it "implementation-dependent"?
By the way, in 3.1.x, Configuration::operator[] does return char * so
there's no unnecessary conversion involved. I didn't realise that in
3.2 that was changed to String, so when I ported this patch from 3.1.x
to 3.2.0b1, I missed this.
--
Gilles R. Detillieux E-mail: <[EMAIL PROTECTED]>
Spinal Cord Research Centre WWW: http://www.scrc.umanitoba.ca/~grdetil
Dept. Physiology, U. of Manitoba Phone: (204)789-3766
Winnipeg, MB R3E 3J7 (Canada) Fax: (204)789-3930
------------------------------------
To unsubscribe from the htdig3-dev mailing list, send a message to
[EMAIL PROTECTED] containing the single word "unsubscribe" in
the SUBJECT of the message.