Closed
Bug 235504
Opened 21 years ago
Closed 21 years ago
Remove nsCString::EqualsWithConversion(const char*)
Categories
(Core :: XPCOM, defect, P3)
Core
XPCOM
Tracking
()
RESOLVED
FIXED
mozilla1.8alpha1
People
(Reporter: Biesinger, Assigned: Biesinger)
Details
Attachments
(1 file, 1 obsolete file)
10.67 KB,
patch
|
dbaron
:
superreview+
|
Details | Diff | Splinter Review |
There's no need for this function. Comparing a CString with a char* string does
not do any conversion.
Assignee | ||
Updated•21 years ago
|
Priority: -- → P3
Target Milestone: --- → mozilla1.8alpha
Assignee | ||
Updated•21 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 1•21 years ago
|
||
Assignee | ||
Updated•21 years ago
|
Attachment #145208 -
Flags: review?(darin)
Comment 2•21 years ago
|
||
Comment on attachment 145208 [details] [diff] [review]
patch
>Index: xpcom/string/public/nsTString.h
>+#ifdef CharT_is_char
>+ PRBool EqualsIgnoreCase( const char* aString, PRInt32 aCount=-1 ) const {
>+ return Compare(aString, PR_TRUE, aCount) == 0;
>+ }
>+#endif
>+
>+#ifdef CharT_is_PRUnichar
> /**
> * Equality check between given string and this string.
> *
> * @param aString is the string to check
> * @param aIgnoreCase tells us how to treat case
> * @param aCount tells us how many chars to compare
> * @return boolean
> */
>
> NS_COM PRBool EqualsWithConversion( const char* aString, PRBool aIgnoreCase=PR_FALSE, PRInt32 aCount=-1 ) const;
> PRBool EqualsIgnoreCase( const char* aString, PRInt32 aCount=-1 ) const
> {
> return EqualsWithConversion(aString, PR_TRUE, aCount);
> }
I think it would be better to declare the CharT_is_char version of
EqualsIgnoreCase underneath the comment that formerly documented
its behavior. That's where the other one lives.
Maybe you could use #else also?
r=darin
Attachment #145208 -
Flags: review?(darin) → review+
Assignee | ||
Comment 3•21 years ago
|
||
Attachment #145208 -
Attachment is obsolete: true
Assignee | ||
Updated•21 years ago
|
Attachment #145281 -
Flags: superreview?(dbaron)
Attachment #145281 -
Flags: superreview?(dbaron) → superreview+
Assignee | ||
Comment 4•21 years ago
|
||
checked in
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 5•21 years ago
|
||
I backed out the string api changes for the moment because they caused bustage
and I don't currently have time for dealing with it...
I'll reland sometime soon
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 6•21 years ago
|
||
ok, checked in again
Status: REOPENED → RESOLVED
Closed: 21 years ago → 21 years ago
Resolution: --- → FIXED
Updated•4 years ago
|
Component: String → XPCOM
You need to log in
before you can comment on or make changes to this bug.
Description
•