mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-21 12:44:50 +02:00
MdeModulePkg/Oniguruma: Remove redundant IF statement
The if statement is not necessary, so keep it to edk2 style. And this change has been merged to onigruma. REF:https://github.com/kkos/oniguruma/pull/158 Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
This commit is contained in:
parent
c18708d2f0
commit
2b23beb043
@ -2983,17 +2983,13 @@ onigenc_unicode_fold1_key(OnigCodePoint codes[])
|
|||||||
4026
|
4026
|
||||||
};
|
};
|
||||||
|
|
||||||
if (0 == 0)
|
int key = hash(codes);
|
||||||
{
|
if (key <= MAX_HASH_VALUE) {
|
||||||
int key = hash(codes);
|
int index = wordlist[key];
|
||||||
|
if (index >= 0 && onig_codes_cmp(codes, OnigUnicodeFolds1 + index, 1) == 0) {
|
||||||
if (key <= MAX_HASH_VALUE)
|
return index;
|
||||||
{
|
}
|
||||||
int index = wordlist[key];
|
|
||||||
|
|
||||||
if (index >= 0 && onig_codes_cmp(codes, OnigUnicodeFolds1 + index, 1) == 0)
|
|
||||||
return index;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -211,17 +211,12 @@ onigenc_unicode_fold2_key(OnigCodePoint codes[])
|
|||||||
129
|
129
|
||||||
};
|
};
|
||||||
|
|
||||||
if (0 == 0)
|
int key = hash(codes);
|
||||||
{
|
if (key <= MAX_HASH_VALUE) {
|
||||||
int key = hash(codes);
|
int index = wordlist[key];
|
||||||
|
if (index >= 0 && onig_codes_cmp(codes, OnigUnicodeFolds2 + index, 2) == 0)
|
||||||
if (key <= MAX_HASH_VALUE)
|
return index;
|
||||||
{
|
|
||||||
int index = wordlist[key];
|
|
||||||
|
|
||||||
if (index >= 0 && onig_codes_cmp(codes, OnigUnicodeFolds2 + index, 2) == 0)
|
|
||||||
return index;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -121,17 +121,13 @@ onigenc_unicode_fold3_key(OnigCodePoint codes[])
|
|||||||
0
|
0
|
||||||
};
|
};
|
||||||
|
|
||||||
if (0 == 0)
|
int key = hash(codes);
|
||||||
{
|
if (key <= MAX_HASH_VALUE) {
|
||||||
int key = hash(codes);
|
int index = wordlist[key];
|
||||||
|
if (index >= 0 && onig_codes_cmp(codes, OnigUnicodeFolds3 + index, 3) == 0) {
|
||||||
if (key <= MAX_HASH_VALUE)
|
return index;
|
||||||
{
|
}
|
||||||
int index = wordlist[key];
|
|
||||||
|
|
||||||
if (index >= 0 && onig_codes_cmp(codes, OnigUnicodeFolds3 + index, 3) == 0)
|
|
||||||
return index;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -3288,17 +3288,12 @@ onigenc_unicode_unfold_key(OnigCodePoint code)
|
|||||||
{0x1e907, 4005, 1}
|
{0x1e907, 4005, 1}
|
||||||
};
|
};
|
||||||
|
|
||||||
if (0 == 0)
|
int key = hash(&code);
|
||||||
{
|
if (key <= MAX_HASH_VALUE) {
|
||||||
int key = hash(&code);
|
OnigCodePoint gcode = wordlist[key].code;
|
||||||
|
if (code == gcode && wordlist[key].index >= 0) {
|
||||||
if (key <= MAX_HASH_VALUE)
|
return &wordlist[key];
|
||||||
{
|
}
|
||||||
OnigCodePoint gcode = wordlist[key].code;
|
|
||||||
|
|
||||||
if (code == gcode && wordlist[key].index >= 0)
|
|
||||||
return &wordlist[key];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user