rewrite valid code to avoid MSVC initializer warning