• Christopher Dykes's avatar
    Start fixing implicit truncations · 4dd1dd68
    Christopher Dykes authored
    Summary:
    Truncations should be explicit, but for some reason, MSVC seems to be the only compiler that will warn you when you implicitly truncate integer or float values.
    This allows Folly to be compiled with warnings 4018, 4242, 4244 and 4305 enabled.
    Technically 4018 is a sign mismatch warning, but there was only one place it was being triggered so I included it anyways. The other 3 are warnings for implicit truncation.
    
    There is one other implicit truncation warning that currently triggers in Folly, 4267, but there are a lot more places where that triggers so I'll do that in a separate diff.
    
    Reviewed By: yfeldblum
    
    Differential Revision: D4249471
    
    fbshipit-source-id: e18a93d85856c998576934a6229c9edd1638a54e
    4dd1dd68
Conv.cpp 24.4 KB