[Scummvm-devel] Make class String case insensitive by default?

Eugene Sandulenko sev at scummvm.org
Sat Jul 22 20:30:17 CEST 2006


On Sat, 22 Jul 2006 15:47:57 +0200
Max Horn <max at quendi.de> wrote:

> Hi,
> 
> I am wondering whether we should turn the comparison operators of  
> class String to be case insensitive by default (that would also  
> affect hash(), of course). Looking through our code, we have to use  
> scummvm_stricmp, or toLowerCase over and over again. So far, I  
> haven't seen any case were we explicitly want case *sensitive*  
> comparisons. Can anybody think of any examples for the latter in our  
> existing code?
So far I assumed that variable names defined in GUI theme are case
sensitive, however there are no clashes in current themes. That means
that it should work with case insensitive comparisons.

> Case sensitive compares could still be achieved by using plain  
> strcmp, but I figure by switching the default, we could simplify  
> quite a lot of our code (most engine game detectors, config manager/ 
> file classes, etc.).
Indeed.


Eugene




More information about the Scummvm-devel mailing list