mirror of
https://github.com/microsoft/terminal.git
synced 2026-05-19 21:41:15 +00:00
fix macro
This commit is contained in:
@@ -244,21 +244,18 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
|
||||
for (uint32_t i = 0; i < shortcutArgsNumItems; i++)
|
||||
{
|
||||
const auto argAtIndex = shortcutArgs.GetArgAt(i);
|
||||
if (argAtIndex)
|
||||
{
|
||||
const auto argType = shortcutArgs.GetArgDescriptionAt(i).Type;
|
||||
const auto item = make<ArgWrapper>(argType, argAtIndex);
|
||||
item.PropertyChanged([&, i](const IInspectable& sender, const PropertyChangedEventArgs& args) {
|
||||
const auto itemProperty{ args.PropertyName() };
|
||||
if (itemProperty == L"Value")
|
||||
{
|
||||
const auto argWrapper = sender.as<Microsoft::Terminal::Settings::Editor::ArgWrapper>();
|
||||
const auto newValue = argWrapper.Value();
|
||||
_actionAndArgs.Args().SetArgAt(i, newValue);
|
||||
}
|
||||
});
|
||||
argValues.push_back(item);
|
||||
}
|
||||
const auto argType = shortcutArgs.GetArgDescriptionAt(i).Type;
|
||||
const auto item = make<ArgWrapper>(argType, argAtIndex);
|
||||
item.PropertyChanged([&, i](const IInspectable& sender, const PropertyChangedEventArgs& args) {
|
||||
const auto itemProperty{ args.PropertyName() };
|
||||
if (itemProperty == L"Value")
|
||||
{
|
||||
const auto argWrapper = sender.as<Microsoft::Terminal::Settings::Editor::ArgWrapper>();
|
||||
const auto newValue = argWrapper.Value();
|
||||
_actionAndArgs.Args().SetArgAt(i, newValue);
|
||||
}
|
||||
});
|
||||
argValues.push_back(item);
|
||||
}
|
||||
|
||||
_ArgValues = single_threaded_observable_vector(std::move(argValues));
|
||||
|
||||
@@ -105,8 +105,6 @@ struct InitListPlaceholder
|
||||
// is used as the conditional for the validation here.
|
||||
#define FROM_JSON_ARGS(type, name, jsonKey, required, ...) \
|
||||
JsonUtils::GetValueForKey(json, jsonKey, args->_##name); \
|
||||
args->_argCount += 1; \
|
||||
args->_argDescriptions.push_back({ L## #name, L## #type, std::wstring(L## #required) != L"false" }); \
|
||||
if (required) \
|
||||
{ \
|
||||
return { nullptr, { SettingsLoadWarnings::MissingRequiredParameter } }; \
|
||||
@@ -148,7 +146,6 @@ struct InitListPlaceholder
|
||||
\
|
||||
private: \
|
||||
InitListPlaceholder _placeholder; \
|
||||
uint32_t _argCount{ 0 }; \
|
||||
std::vector<ArgDescription> _argDescriptions; \
|
||||
\
|
||||
public: \
|
||||
@@ -183,7 +180,6 @@ public: \
|
||||
{ \
|
||||
auto copy{ winrt::make_self<className>() }; \
|
||||
argsMacro(COPY_ARGS); \
|
||||
copy->_argCount = _argCount; \
|
||||
copy->_argDescriptions = _argDescriptions; \
|
||||
return *copy; \
|
||||
} \
|
||||
|
||||
Reference in New Issue
Block a user