diff --git a/swiftwinrt/abi_writer.h b/swiftwinrt/abi_writer.h index 9ff3e9f9..cd174166 100644 --- a/swiftwinrt/abi_writer.h +++ b/swiftwinrt/abi_writer.h @@ -100,9 +100,15 @@ namespace swiftwinrt // Don't write "built-in types" since these are defined in other header files // These aren't completely removed from metadata because we need to generate them // on the swift side + static std::set removed_types = { + "Windows.Foundation.Collections.CollectionChange", + "Windows.Foundation.Collections.IVectorChangedEventArgs", + "Windows.Foundation.IAsyncInfo", + "Windows.Foundation.AsyncStatus" + }; static bool should_write(metadata_type const& type) { - return !use_sdk_c_header_definition(type); + return !removed_types.contains(type.swift_full_name()); } static void write_includes(writer& w, type_cache const& types, std::string_view fileName) diff --git a/swiftwinrt/helpers.h b/swiftwinrt/helpers.h index a7f75b1d..09aba315 100644 --- a/swiftwinrt/helpers.h +++ b/swiftwinrt/helpers.h @@ -907,15 +907,4 @@ namespace swiftwinrt return true; } - - inline bool use_sdk_c_header_definition(metadata_type const& type) - { - static std::set removed_types = { - "Windows.Foundation.Collections.CollectionChange", - "Windows.Foundation.Collections.IVectorChangedEventArgs", - "Windows.Foundation.IAsyncInfo", - "Windows.Foundation.AsyncStatus" - }; - return removed_types.contains(type.swift_full_name()); - } }