This commit aligns the COM-consuming code in VsSetupInstance with best practices such as passing COM pointers by pointer when they do not need to be owning references and not using `const` on members, as well as cleans up some dead code. Leonard contributed clang-tidy fixes and some reference passing changes. Co-authored-by: Leonard Hecker <lhecker@microsoft.com>
22 lines
678 B
C++
22 lines
678 B
C++
// Copyright (c) Microsoft Corporation.
|
|
// Licensed under the MIT license.
|
|
|
|
#include "pch.h"
|
|
#include "VsDevCmdGenerator.h"
|
|
|
|
using namespace Microsoft::Terminal::Settings::Model;
|
|
|
|
std::wstring VsDevCmdGenerator::GetProfileName(const VsSetupConfiguration::VsSetupInstance& instance) const
|
|
{
|
|
std::wstring name{ L"Developer Command Prompt for VS " };
|
|
name.append(instance.GetProfileNameSuffix());
|
|
return name;
|
|
}
|
|
|
|
std::wstring VsDevCmdGenerator::GetProfileCommandLine(const VsSetupConfiguration::VsSetupInstance& instance) const
|
|
{
|
|
std::wstring commandLine{ L"cmd.exe /k \"" + instance.GetDevCmdScriptPath() + L"\"" };
|
|
|
|
return commandLine;
|
|
}
|