mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-14 18:51:28 +00:00
Bug 372298 - xpcom/io: 10K codesize reduction by fixing string array p=Alfred Kayser <alfredkayser@nl.ibm.com> r+a=bsmedberg
This commit is contained in:
parent
8c98152cba
commit
5347590a4c
@ -2291,7 +2291,7 @@ nsLocalFile::IsExecutable(PRBool *_retval)
|
||||
*p += (*p >= L'A' && *p <= L'Z') ? 'a' - 'A' : 0;
|
||||
|
||||
// Search for any of the set of executable extensions.
|
||||
const char * const executableExts[] = {
|
||||
static const char * const executableExts[] = {
|
||||
"ad",
|
||||
"ade", // access project extension
|
||||
"adp",
|
||||
@ -2363,10 +2363,10 @@ nsLocalFile::IsExecutable(PRBool *_retval)
|
||||
"ws",
|
||||
"wsc",
|
||||
"wsf",
|
||||
"wsh",
|
||||
0 };
|
||||
for ( int i = 0; executableExts[i]; i++ ) {
|
||||
if ( Substring(path, dotIdx + 1).EqualsASCII(executableExts[i])) {
|
||||
"wsh"};
|
||||
nsDependentSubstring ext = Substring(path, dotIdx + 1);
|
||||
for ( int i = 0; i < NS_ARRAY_LENGTH(executableExts); i++ ) {
|
||||
if ( ext.EqualsASCII(executableExts[i])) {
|
||||
// Found a match. Set result and quit.
|
||||
*_retval = PR_TRUE;
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user