Monday, November 29, 2004

This is a little gem

I found this in some C++ code I've inherited. The preceding code isolates a file extension into an STL string, strExt. The code then does case sensitive compares against a range of file extensions and branches to appropriate code. Somewhere along the line my predecessor must have run into a variety of capitalisations, hence this.

else if (strExt == _T(".txt") strExt == _T(".TXT") strExt == _T(".Txt"))

No comments: