remove redundant code in platform.h