forked from mirrors/gecko-dev
Bug 1725363 - Replace PL_strcasecmp with nsCRT::strcasecmp image/ r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D129074
This commit is contained in:
parent
1f607e5f9f
commit
368311a741
1 changed files with 5 additions and 4 deletions
|
|
@ -19,6 +19,7 @@
|
||||||
#include "nsIURL.h"
|
#include "nsIURL.h"
|
||||||
#include "nsNetUtil.h"
|
#include "nsNetUtil.h"
|
||||||
#include "plstr.h"
|
#include "plstr.h"
|
||||||
|
#include "nsCRT.h"
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
using namespace mozilla;
|
using namespace mozilla;
|
||||||
|
|
@ -218,7 +219,7 @@ nsresult nsMozIconURI::SetSpecInternal(const nsACString& aSpec) {
|
||||||
if (!sizeString.IsEmpty()) {
|
if (!sizeString.IsEmpty()) {
|
||||||
const char* sizeStr = sizeString.get();
|
const char* sizeStr = sizeString.get();
|
||||||
for (uint32_t i = 0; i < ArrayLength(kSizeStrings); i++) {
|
for (uint32_t i = 0; i < ArrayLength(kSizeStrings); i++) {
|
||||||
if (PL_strcasecmp(sizeStr, kSizeStrings[i]) == 0) {
|
if (nsCRT::strcasecmp(sizeStr, kSizeStrings[i]) == 0) {
|
||||||
mIconSize = i;
|
mIconSize = i;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -235,7 +236,7 @@ nsresult nsMozIconURI::SetSpecInternal(const nsACString& aSpec) {
|
||||||
if (!stateString.IsEmpty()) {
|
if (!stateString.IsEmpty()) {
|
||||||
const char* stateStr = stateString.get();
|
const char* stateStr = stateString.get();
|
||||||
for (uint32_t i = 0; i < ArrayLength(kStateStrings); i++) {
|
for (uint32_t i = 0; i < ArrayLength(kStateStrings); i++) {
|
||||||
if (PL_strcasecmp(stateStr, kStateStrings[i]) == 0) {
|
if (nsCRT::strcasecmp(stateStr, kStateStrings[i]) == 0) {
|
||||||
mIconState = i;
|
mIconState = i;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -412,7 +413,7 @@ nsMozIconURI::Equals(nsIURI* other, bool* result) {
|
||||||
rv = other->GetSpec(spec2);
|
rv = other->GetSpec(spec2);
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
|
|
||||||
if (!PL_strcasecmp(spec1.get(), spec2.get())) {
|
if (!nsCRT::strcasecmp(spec1.get(), spec2.get())) {
|
||||||
*result = true;
|
*result = true;
|
||||||
} else {
|
} else {
|
||||||
*result = false;
|
*result = false;
|
||||||
|
|
@ -435,7 +436,7 @@ nsMozIconURI::SchemeIs(const char* aScheme, bool* aEquals) {
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
*aEquals = PL_strcasecmp("moz-icon", aScheme) ? false : true;
|
*aEquals = nsCRT::strcasecmp("moz-icon", aScheme) == 0;
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue