From ba7a754a76dd755bccda9eb325574fb6d3382c07 Mon Sep 17 00:00:00 2001 From: Karl Tomlinson Date: Fri, 19 Oct 2018 01:07:10 +0000 Subject: [PATCH] Bug 1499212 adjust Literal method doc so as not to imply that |this| must be a literal string r=dbaron Depends on D8774 Differential Revision: https://phabricator.services.mozilla.com/D8775 --HG-- extra : moz-landing-system : lando --- xpcom/string/nsTStringRepr.h | 4 ++-- xpcom/string/nsTSubstring.h | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/xpcom/string/nsTStringRepr.h b/xpcom/string/nsTStringRepr.h index f7f3054f83d0..313d21c985e7 100644 --- a/xpcom/string/nsTStringRepr.h +++ b/xpcom/string/nsTStringRepr.h @@ -257,7 +257,7 @@ public: // null-terminated. bool NS_FASTCALL EqualsASCII(const char* aData) const; - // EqualsLiteral must ONLY be applied to an actual literal string, or + // EqualsLiteral must ONLY be called with an actual literal string, or // a char array *constant* declared without an explicit size. // Do not attempt to use it with a non-constant char array variable. // Use EqualsASCII for that. @@ -282,7 +282,7 @@ public: size_type aLen) const; bool NS_FASTCALL LowerCaseEqualsASCII(const char* aData) const; - // LowerCaseEqualsLiteral must ONLY be applied to an actual + // LowerCaseEqualsLiteral must ONLY be called with an actual // literal string, or a char array *constant* declared without an // explicit size. Do not attempt to use it with a non-constant char array // variable. Use LowerCaseEqualsASCII for that. diff --git a/xpcom/string/nsTSubstring.h b/xpcom/string/nsTSubstring.h index d8cb004954ac..02e9ea029ddc 100644 --- a/xpcom/string/nsTSubstring.h +++ b/xpcom/string/nsTSubstring.h @@ -473,7 +473,7 @@ public: aFallible); } - // AssignLiteral must ONLY be applied to an actual literal string, or + // AssignLiteral must ONLY be called with an actual literal string, or // a character array *constant* declared without an explicit size. // Do not attempt to use it with a character array variable that is not // constant or does not have static storage duration. Use Assign or @@ -490,7 +490,7 @@ public: AssignLiteral(aStr, N - 1); } - // AssignLiteral must ONLY be applied to an actual literal string, or + // AssignLiteral must ONLY be called with an actual literal string, or // a char array *constant* declared without an explicit size. // Do not attempt to use it with a non-constant char array variable. // Use AssignASCII for that. @@ -593,7 +593,7 @@ public: size_type aLength, const fallible_t&); - // ReplaceLiteral must ONLY be applied to an actual literal string. + // ReplaceLiteral must ONLY be called with an actual literal string. // Do not attempt to use it with a character array variable. // Use Replace or ReplaceASCII for that. template @@ -641,7 +641,7 @@ public: // Appends a literal string ("" literal in the 8-bit case and u"" literal // in the 16-bit case) to the string. // - // AppendLiteral must ONLY be applied to an actual literal string. + // AppendLiteral must ONLY be called with an actual literal string. // Do not attempt to use it with a character array variable. // Use Append or AppendASCII for that. template @@ -802,7 +802,7 @@ public: Replace(aPos, 0, aTuple); } - // InsertLiteral must ONLY be applied to an actual literal string. + // InsertLiteral must ONLY be called with an actual literal string. // Do not attempt to use it with a character array variable. // Use Insert for that. template