Closed
Bug 1012807
Opened 11 years ago
Closed 7 months ago
convert nsMsgUtils.cpp::MsgStripQuotedPrintable(unsigned char *src) to 'const char*'
Categories
(MailNews Core :: Backend, defect)
MailNews Core
Backend
Tracking
(Not tracked)
RESOLVED
WORKSFORME
People
(Reporter: aceman, Assigned: aceman)
References
Details
Attachments
(1 file)
|
4.51 KB,
patch
|
neil
:
review-
|
Details | Diff | Splinter Review |
+++ This bug was initially created as a clone of Bug #853159 comment 32 +++
neil@parkwaycc.co.uk 2014-05-19 00:27:55 CEST
(In reply to aceman from comment #30)
> > [Given that there are hardly any uses of token left, you might as well just
> > use src + srcIdx + 1 directly.]
> Yes, except the ugly cast from unsigned char* to const char*.
Oops, both callers ugly cast from const char* to unsigned char* (which is worse, because it's casting away const!) Obviously that needs to be fixed in a separate bug, but that will therefore simplify these uses too.
Attachment #8425003 -
Flags: review?(neil)
Comment 2•11 years ago
|
||
Comment on attachment 8425003 [details] [diff] [review]
patch
Actually const char* is also wrong, because we're still casting away const (this time in MsgStripQuotedPrintable itself). You have three choices:
* Pass char* and use BeginWriting() instead of get()
* Pass nsCString& and use BeginWriting inside MsgStripQuotedPrintable
* Pass nsACString& and use string manipulation methods
Note that for the latter two you can also update the length at the same time.
Attachment #8425003 -
Flags: review?(neil) → review-
Updated•3 years ago
|
Severity: trivial → S4
Comment 3•7 months ago
|
||
This was fixed by bug 1408175.
You need to log in
before you can comment on or make changes to this bug.
Description
•