28.08.2012, 16:19, "Stephen Chu" <[email protected]>:
> On 8/28/12 3:56 AM, Christian Kandeler wrote:
>
>>        QStringList rc(QLatin1String(".svn"));
>>        if (Utils::HostOsInfo::isWindowsHost())
>>            rc.push_back(QLatin1String("_svn"));
>>        return rc;
>
> Doesn't this generate dead code that will never be executed on platforms
> other than the intended one?
>
> My understanding is unless the function is declared as constexp and
> build with C++11 option, the compiler will not be able to optimize out
> the code for non-targeted platform.

Your understanding is correct, but probably elimination of dead code is not too
interesting here.

-- 
Regards,
Konstantin
_______________________________________________
Qt-creator mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/qt-creator

Reply via email to