Data function of TString

There is bug in documentation.
If you look on function TString::Data()
(root.cern.ch/root/html526/TStrin … tring:Data)
you can see:
char * Data() const
{ return (char*)(this+1); }
It looks … suspicious :slight_smile:
Indeed in source code (core/base/inc/TString.h) I found:
const char *Data() const { return fData; }

It seems that automatically generated documentation are wrong
for cases when one file contains few classes.

Yuri

In TString.h Data() is the same as on the online doc (I just checked)… also this page is the same:
root.cern.ch/root/html526/src/TS … tml#mbJOHD

May be I missed something but for me it looks ok.

[quote=“couet”]In TString.h Data() is the same as on the online doc (I just checked)… also this page is the same:
root.cern.ch/root/html526/src/TS … tml#mbJOHD
[/quote]
Yes, because this is just copy of source file.
I am speaking about documentation of the class: Tstring.html
root.cern.ch/root/html526/TStrin … tring:Data

My point is that I in the source code:
root.cern.ch/viewvc/trunk/core/b … iew=markup

I see:

   char        *Data() const     { return (char*)(this+1); }

Which is exactly what the THTML doc shows. So all looks fine.

If you will look 15 lines above you see that this is
function from TStringRef class (not TString).
And this is my point. The “description” of function
was taken from wrong class.