Skip to content

Commit 06ac2ad

Browse files
Fea, YY.Depends.Analyzer的分析报告中Supported OS进行排序,便于阅读
1 parent 1e0a181 commit 06ac2ad

1 file changed

Lines changed: 16 additions & 9 deletions

File tree

src/YY.Depends.Analyzer/YY.Depends.Analyzer.cpp

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -768,6 +768,8 @@ CStringA FindInAllTarget(CStringA _szDllName, CStringA _szImportName, CStringW _
768768

769769
UINT16 _CurrentTargetVersion[4] = {};
770770
swscanf_s(_szCurrentTarget, L"%hd.%hd.%hd.%hd", &_CurrentTargetVersion[3], &_CurrentTargetVersion[2], &_CurrentTargetVersion[1], &_CurrentTargetVersion[0]);
771+
772+
std::map<UINT64, CStringW> _TargetVersions;
771773

772774
do
773775
{
@@ -785,23 +787,28 @@ CStringA FindInAllTarget(CStringA _szDllName, CStringA _szImportName, CStringW _
785787
{
786788
if (_pModuleInfo->FindImport(_szImportName))
787789
{
788-
if (_szResult.GetLength())
789-
{
790-
_szResult += ',';
791-
_szResult += ' ';
792-
}
793-
_szResult += _FindFileData.cFileName;
794-
// 去掉后缀 ".txt"
795-
_szResult.ReleaseBufferSetLength(_szResult.GetLength() - 4);
790+
// 去掉后缀 ".txt"
791+
_TargetVersions[*(UINT64*)_TargetVersion] = CStringW(_FindFileData.cFileName, wcslen(_FindFileData.cFileName) - 4);
796792
}
797793
}
798794
}
799-
800795
}
801796

802797
} while (FindNextFileW(_hFindFile, &_FindFileData));
803798

804799
FindClose(_hFindFile);
800+
801+
if (_TargetVersions.size())
802+
{
803+
for (const auto& _oTargetVersion : _TargetVersions)
804+
{
805+
_szResult += _oTargetVersion.second;
806+
_szResult += ',';
807+
_szResult += ' ';
808+
}
809+
810+
_szResult.GetBufferSetLength(_szResult.GetLength() - 2);
811+
}
805812

806813
return _szResult;
807814
}

0 commit comments

Comments
 (0)