CharacterSetRoster: Fix PVS 528-530
Remove unneed if conditions, since unsigned type value is never < 0. Change-Id: I76621f79883752cd3560c6e02f18384b1ddd9cf3 Reviewed-on: https://review.haiku-os.org/797 Reviewed-by: Barrett17 <[email protected]>
This commit is contained in:
@@ -56,7 +56,7 @@ BCharacterSetRoster::StopWatching(BMessenger target)
|
|||||||
const BCharacterSet *
|
const BCharacterSet *
|
||||||
BCharacterSetRoster::GetCharacterSetByFontID(uint32 id)
|
BCharacterSetRoster::GetCharacterSetByFontID(uint32 id)
|
||||||
{
|
{
|
||||||
if ((id < 0) || (id >= character_sets_by_id_count)) {
|
if (id >= character_sets_by_id_count) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
return character_sets_by_id[id];
|
return character_sets_by_id[id];
|
||||||
@@ -65,7 +65,7 @@ BCharacterSetRoster::GetCharacterSetByFontID(uint32 id)
|
|||||||
const BCharacterSet *
|
const BCharacterSet *
|
||||||
BCharacterSetRoster::GetCharacterSetByConversionID(uint32 id)
|
BCharacterSetRoster::GetCharacterSetByConversionID(uint32 id)
|
||||||
{
|
{
|
||||||
if ((id+1 < 0) || (id+1 >= character_sets_by_id_count)) {
|
if (id + 1 >= character_sets_by_id_count) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
return character_sets_by_id[id+1];
|
return character_sets_by_id[id+1];
|
||||||
@@ -74,7 +74,7 @@ BCharacterSetRoster::GetCharacterSetByConversionID(uint32 id)
|
|||||||
const BCharacterSet *
|
const BCharacterSet *
|
||||||
BCharacterSetRoster::GetCharacterSetByMIBenum(uint32 MIBenum)
|
BCharacterSetRoster::GetCharacterSetByMIBenum(uint32 MIBenum)
|
||||||
{
|
{
|
||||||
if ((MIBenum < 0) || (MIBenum > maximum_valid_MIBenum)) {
|
if (MIBenum > maximum_valid_MIBenum) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
return character_sets_by_MIBenum[MIBenum];
|
return character_sets_by_MIBenum[MIBenum];
|
||||||
|
|||||||
Reference in New Issue
Block a user