From 54d891a1eee7b6e34715795b23f33c26b1598686 Mon Sep 17 00:00:00 2001 From: Tian Liao Date: Wed, 16 Oct 2024 17:17:33 +0800 Subject: [PATCH] pass build --- src/CalcViewModel/Snapshots.cpp | 25 +++++++++++-------- .../StandardCalculatorViewModel.cpp | 1 - .../CalcViewModelCopyForUT.vcxproj | 2 ++ .../CalcViewModelCopyForUT.vcxproj.filters | 2 ++ 4 files changed, 18 insertions(+), 12 deletions(-) diff --git a/src/CalcViewModel/Snapshots.cpp b/src/CalcViewModel/Snapshots.cpp index b238afce..87fc31db 100644 --- a/src/CalcViewModel/Snapshots.cpp +++ b/src/CalcViewModel/Snapshots.cpp @@ -4,6 +4,7 @@ #include "pch.h" #include #include +#include #include "Snapshots.h" @@ -11,25 +12,29 @@ namespace { ref struct UnaryCommand sealed : public CalculatorApp::ViewModel::ICalcManagerIExprCommand { - property Windows::Foundation::Collections::IVector ^ Commands; + internal :; + std::vector Commands; }; ref struct BinaryCommand sealed : public CalculatorApp::ViewModel::ICalcManagerIExprCommand { - property int Command; + internal :; + int Command; }; ref struct OperandCommand sealed : public CalculatorApp::ViewModel::ICalcManagerIExprCommand { - property bool IsNegative; - property bool IsDecimalPresent; - property bool IsSciFmt; - property Windows::Foundation::Collections::IVector ^ Commands; + internal :; + bool IsNegative; + bool IsDecimalPresent; + bool IsSciFmt; + std::vector Commands; }; ref struct Parentheses sealed : public CalculatorApp::ViewModel::ICalcManagerIExprCommand { - property int Command; + internal :; + int Command; }; CalculatorApp::ViewModel::ICalcManagerIExprCommand ^ CreateExprCommand(const IExpressionCommand* exprCmd) { @@ -39,10 +44,9 @@ namespace { auto cmd = static_cast(exprCmd); auto result = ref new UnaryCommand(); - result->Commands = ref new Platform::Collections::Vector(); for (auto& subcmd : *cmd->GetCommands()) { - result->Commands->Append(subcmd); + result->Commands.push_back(subcmd); } return result; } @@ -60,10 +64,9 @@ namespace result->IsNegative = cmd->IsNegative(); result->IsDecimalPresent = cmd->IsDecimalPresent(); result->IsSciFmt = cmd->IsSciFmt(); - result->Commands = ref new Platform::Collections::Vector(); for (auto& subcmd : *cmd->GetCommands()) { - result->Commands->Append(subcmd); + result->Commands.push_back(subcmd); } return result; } diff --git a/src/CalcViewModel/StandardCalculatorViewModel.cpp b/src/CalcViewModel/StandardCalculatorViewModel.cpp index 6a0727ab..d39e5848 100644 --- a/src/CalcViewModel/StandardCalculatorViewModel.cpp +++ b/src/CalcViewModel/StandardCalculatorViewModel.cpp @@ -1789,7 +1789,6 @@ void StandardCalculatorViewModel::SetBitshiftRadioButtonCheckedAnnouncement(Plat StandardCalculatorSnapshot ^ StandardCalculatorViewModel::GetSnapshot() const { - CUnaryCommand; auto result = ref new StandardCalculatorSnapshot(); result->CalcManager = ref new CalcManagerSnapshot(m_standardCalculatorManager); result->PrimaryDisplay = ref new PrimaryDisplaySnapshot(m_DisplayValue, m_IsInError); diff --git a/src/CalcViewModelCopyForUT/CalcViewModelCopyForUT.vcxproj b/src/CalcViewModelCopyForUT/CalcViewModelCopyForUT.vcxproj index 7aef42f5..2171c9cd 100644 --- a/src/CalcViewModelCopyForUT/CalcViewModelCopyForUT.vcxproj +++ b/src/CalcViewModelCopyForUT/CalcViewModelCopyForUT.vcxproj @@ -333,6 +333,7 @@ + @@ -375,6 +376,7 @@ Create Create + diff --git a/src/CalcViewModelCopyForUT/CalcViewModelCopyForUT.vcxproj.filters b/src/CalcViewModelCopyForUT/CalcViewModelCopyForUT.vcxproj.filters index 19ca2cee..2691d534 100644 --- a/src/CalcViewModelCopyForUT/CalcViewModelCopyForUT.vcxproj.filters +++ b/src/CalcViewModelCopyForUT/CalcViewModelCopyForUT.vcxproj.filters @@ -87,6 +87,7 @@ GraphingCalculator + @@ -204,6 +205,7 @@ Common +