Fix initialization of _InOut_ variable (#4397)

* Fix initialization of _InOut_ variable

* make package const auto
This commit is contained in:
Bob Pulliam 2024-05-08 19:29:57 -04:00 коммит произвёл GitHub
Родитель bf4b93ab89
Коммит 512a592403
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
2 изменённых файлов: 3 добавлений и 4 удалений

Просмотреть файл

@ -107,7 +107,7 @@ namespace winrt::Microsoft::Windows::ApplicationModel::WindowsAppRuntime::implem
// (i.e. if any of the target packages is not installed, GetStatus should return PackageInstallRequired).
HRESULT verifyResult{};
for (auto package : c_targetPackages)
for (const auto package : c_targetPackages)
{
// Build package family name based on the framework naming scheme.
std::wstring packageFamilyName{};
@ -326,9 +326,8 @@ namespace winrt::Microsoft::Windows::ApplicationModel::WindowsAppRuntime::implem
}
HRESULT DeploymentManager::VerifyPackage(const std::wstring& packageFamilyName, const PACKAGE_VERSION targetVersion,
__out std::wstring& packageIdentifier) try
const std::wstring& packageIdentifier) try
{
packageIdentifier = L"";
auto packageFullNames{ FindPackagesByFamily(packageFamilyName) };
bool match{};
for (const auto& packageFullName : packageFullNames)

Просмотреть файл

@ -37,7 +37,7 @@ namespace winrt::Microsoft::Windows::ApplicationModel::WindowsAppRuntime::implem
private:
static MddCore::PackageInfo GetPackageInfoForPackage(std::wstring const& packageFullName);
static std::vector<std::wstring> FindPackagesByFamily(std::wstring const& packageFamilyName);
static HRESULT VerifyPackage(const std::wstring& packageFamilyName, const PACKAGE_VERSION targetVersion, __out std::wstring& matchedPackageFullName);
static HRESULT VerifyPackage(const std::wstring& packageFamilyName, const PACKAGE_VERSION targetVersion, const std::wstring& matchedPackageFullName);
static std::wstring GetPackagePath(std::wstring const& packageFullName);
static HRESULT AddOrRegisterPackageInBreakAwayProcess(const std::filesystem::path& packagePath, const bool regiterHigherVersionPackage, const bool forceDeployment);
static std::wstring GenerateDeploymentAgentPath();