diff options
Diffstat (limited to 'src/docparser.cpp')
-rw-r--r-- | src/docparser.cpp | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/docparser.cpp b/src/docparser.cpp index 23b3729..6e2a6d8 100644 --- a/src/docparser.cpp +++ b/src/docparser.cpp @@ -275,21 +275,21 @@ static void docParserPopContext(bool keepParamInfo=FALSE) // replaces > with < and > with > within string s static void unescapeCRef(QCString &s) { - QCString tmp(s); - char *p = tmp.rawData(); + QCString result; + const char *p = s.data(); if (p) { char c; - while ((c=*p)) + while ((c=*p++)) { if (c=='{') c='<'; else if (c=='}') c='>'; - *p++=c; + result+=c; } } - tmp=substitute(tmp,"<","<"); - tmp=substitute(tmp,">",">"); - s = tmp; + result=substitute(result,"<","<"); + result=substitute(result,">",">"); + s = result; } //--------------------------------------------------------------------------- @@ -7166,9 +7166,7 @@ static QCString extractCopyDocId(const char *data, uint &j, uint len) j+=9; } e=j; - QCString id(e-s+1); - if (e>s) memcpy(id.rawData(),data+s,e-s); - id.at(e-s)='\0'; + QCString id(data+s,e-s); //printf("extractCopyDocId='%s' input='%s'\n",qPrint(id),&data[s]); return id; } |