Jean-Marc Lasgouttes wrote:
Abdelrazak Younes <[EMAIL PROTECTED]> writes:

        if (prelen > alen || a.empty())
                return false;
-#if defined(STD_STRING_IS_GOOD)
-       return a.compare(0, prelen, pre) == 0;
-#else
-       return ::strncmp(a.c_str(), pre.c_str(), prelen) == 0;
-#endif
+       else
+               return a.compare(0, prelen, pre) == 0;
The else is superfluous here.

I know, but it was already there in other versions on the same
function. I thought it was actually more readable.

Not to me at least ;-)
And it might even be adding some CPU cycles for nothing, but I am far from sure about that.

I grant you that this is not a flagrant style issue as this is only one line. But if some additional loc is added, those would have to be indented and enclosed between brackets for no good reason... IMHO.

Abdel.

Reply via email to