Hi.  There's been something that's been puzzling me, and I don't know C++
well enough to figure it out.  When compiling htdig (3.1.0b1) on a Linux
system (Red Hat 4.2) I got the following warning:

HTML.cc: In method `void HTML::do_tag(class Retriever &, class String &)':
HTML.cc:677: warning: initialization of non-const `String &' from rvalue `String'
../htlib/htString.h:63: warning: in passing argument 1 of `String::operator =(String 
&)'

I noticed that in htlib/URL.cc, a ".sub()" was always followed by a ".get()",
but on the line above in HTML.cc, it wasn't, so I changed it from:

                      meta_dsc = meta_dsc.sub(0, max_meta_description_length);

to:

                      meta_dsc = meta_dsc.sub(0, max_meta_description_length).get();

My question: was this the right thing to do?  It got rid of the warning
all right, but did it break the code?  The code seems to truncate meta
description tags, so I don't think any of my testing ever gave this
a workout.  Can someone more knowledgeable in C++ and/or this code tell
me if this is right?  Thanks.

-- 
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 htdig mailing list, send a message to
[EMAIL PROTECTED] containing the single word "unsubscribe" in
the body of the message.

Reply via email to