@@ -81,13 +81,17 @@ namespace cppwinrt
8181 };
8282
8383 inline void add_files_from_xml (
84- std::set<std::string>& files, std::string const & sdk_version, std::filesystem::path const & xml_path, std::filesystem::path const & sdk_path, xml_requirement xml_path_requirement)
84+ std::set<std::string>& files,
85+ std::string const & sdk_version,
86+ std::filesystem::path const & xml_path,
87+ std::filesystem::path const & sdk_path,
88+ xml_requirement xml_path_requirement)
8589 {
8690 com_ptr<IStream> stream;
8791
8892 auto streamResult = SHCreateStreamOnFileW (xml_path.c_str (), STGM_READ, &stream.ptr );
89- if (xml_path_requirement == xml_requirement::optional &&
90- (streamResult == HRESULT_FROM_WIN32 (ERROR_FILE_NOT_FOUND) || streamResult == HRESULT_FROM_WIN32 (ERROR_PATH_NOT_FOUND)))
93+ if (xml_path_requirement == xml_requirement::optional && (streamResult == HRESULT_FROM_WIN32 (ERROR_FILE_NOT_FOUND) ||
94+ streamResult == HRESULT_FROM_WIN32 (ERROR_PATH_NOT_FOUND)))
9195 {
9296 return ;
9397 }
@@ -144,8 +148,8 @@ namespace cppwinrt
144148 HKEY_LOCAL_MACHINE,
145149 L" SOFTWARE\\ Microsoft\\ Windows Kits\\ Installed Roots" ,
146150 0 ,
147- // https://task.ms/29349404 - The SDK sometimes stores the 64 bit location into KitsRoot10 which is wrong,
148- // this breaks 64-bit cppwinrt.exe, so work around this by forcing to use the WoW64 hive.
151+ // https://task.ms/29349404 - The SDK sometimes stores the 64 bit location into KitsRoot10 which is
152+ // wrong, this breaks 64-bit cppwinrt.exe, so work around this by forcing to use the WoW64 hive.
149153 KEY_READ | KEY_WOW64_32KEY,
150154 &key))
151155 {
@@ -299,7 +303,8 @@ namespace cppwinrt
299303
300304 struct reader
301305 {
302- template <typename C, typename V, size_t numOptions> reader (C const argc, V const argv, const option (&options)[numOptions])
306+ template <typename C, typename V, size_t numOptions>
307+ reader (C const argc, V const argv, const option (&options)[numOptions])
303308 {
304309#ifdef _DEBUG
305310 {
@@ -422,9 +427,11 @@ namespace cppwinrt
422427#if defined(_WIN32) || defined(_WIN64)
423428 std::array<char , 260 > local{};
424429#ifdef _WIN64
425- ExpandEnvironmentStringsA (" %windir%\\ System32\\ WinMetadata" , local.data (), static_cast <uint32_t >(local.size ()));
430+ ExpandEnvironmentStringsA (
431+ " %windir%\\ System32\\ WinMetadata" , local.data (), static_cast <uint32_t >(local.size ()));
426432#else
427- ExpandEnvironmentStringsA (" %windir%\\ SysNative\\ WinMetadata" , local.data (), static_cast <uint32_t >(local.size ()));
433+ ExpandEnvironmentStringsA (
434+ " %windir%\\ SysNative\\ WinMetadata" , local.data (), static_cast <uint32_t >(local.size ()));
428435#endif
429436 add_directory (local.data ());
430437#else /* defined(_WIN32) || defined(_WIN64) */
@@ -493,12 +500,7 @@ namespace cppwinrt
493500
494501 auto files (std::string_view const & name) const
495502 {
496- return files (
497- name,
498- [](auto &&)
499- {
500- return true ;
501- });
503+ return files (name, [](auto &&) { return true ; });
502504 }
503505
504506 private:
@@ -555,18 +557,16 @@ namespace cppwinrt
555557 }
556558 }
557559
558- template <typename O, typename L> void extract_response_file (std::string_view const & arg, O const & options, L& last)
560+ template <typename O, typename L>
561+ void extract_response_file (std::string_view const & arg, O const & options, L& last)
559562 {
560563 std::filesystem::path response_path{ std::string{ arg } };
561564 std::string extension = response_path.extension ().generic_string ();
562565 std::transform (
563566 extension.begin (),
564567 extension.end (),
565568 extension.begin (),
566- [](auto c)
567- {
568- return static_cast <unsigned char >(::tolower (c));
569- });
569+ [](auto c) { return static_cast <unsigned char >(::tolower (c)); });
570570
571571 // Check if misuse of @ prefix, so if directory or metadata file instead of response file.
572572 if (is_directory (response_path) || extension == " .winmd" )
@@ -589,7 +589,8 @@ namespace cppwinrt
589589 }
590590 }
591591
592- template <typename Character> static void parse_command_line (Character* cmdstart, std::vector<std::string>& argv, size_t * argument_count)
592+ template <typename Character>
593+ static void parse_command_line (Character* cmdstart, std::vector<std::string>& argv, size_t * argument_count)
593594 {
594595
595596 std::string arg;
0 commit comments