Re: [PATCH 1/7] Remove ranges from switch statements.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Florian Forster <octo@xxxxxxxxxxxx> writes:

> -	switch (ch) {
> -	case '/': case '-': case '.':
> -	case 'A'...'Z':	case 'a'...'z':	case '0'...'9':
> +	if (((ch >= 'A') && (ch <= 'Z'))
> +			|| ((ch >= 'a') && (ch <= 'z'))
> +			|| ((ch >= '0') && (ch <= '9'))
> + ...

Sorry for bringing up an old topic again, but wouldn't people
agree that this is easier to read if it were written this way ;-)?
 
	if (	   (('A' <= ch) && (ch <= 'Z'))
        	|| (('a' <= ch) && (ch <= 'z'))
		|| (('0' <= ch) && (ch <= '9'))
	...


-
: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]