mirror of
https://github.com/Microsoft/calculator.git
synced 2025-08-22 14:13:30 -07:00
- ContstructorInitializerAllOnOneLineOrOnePerLine: false
This commit is contained in:
parent
2557b71d0d
commit
96e53c01b6
52 changed files with 210 additions and 75 deletions
|
@ -28,7 +28,7 @@ BreakStringLiterals: true
|
|||
ColumnLimit: 160
|
||||
CommentPragmas: '^ IWYU pragma:'
|
||||
CompactNamespaces: true
|
||||
ConstructorInitializerAllOnOneLineOrOnePerLine: true
|
||||
ConstructorInitializerAllOnOneLineOrOnePerLine: false
|
||||
ConstructorInitializerIndentWidth: 4
|
||||
ContinuationIndentWidth: 4
|
||||
Cpp11BracedListStyle: false
|
||||
|
|
|
@ -40,7 +40,10 @@ void CHistoryCollector::ReinitHistory()
|
|||
// Constructor
|
||||
// Can throw Out of memory error
|
||||
CHistoryCollector::CHistoryCollector(ICalcDisplay* pCalcDisplay, std::shared_ptr<IHistoryDisplay> pHistoryDisplay, wchar_t decimalSymbol)
|
||||
: m_pHistoryDisplay(pHistoryDisplay), m_pCalcDisplay(pCalcDisplay), m_iCurLineHistStart(-1), m_decimalSymbol(decimalSymbol)
|
||||
: m_pHistoryDisplay(pHistoryDisplay)
|
||||
, m_pCalcDisplay(pCalcDisplay)
|
||||
, m_iCurLineHistStart(-1)
|
||||
, m_decimalSymbol(decimalSymbol)
|
||||
{
|
||||
ReinitHistory();
|
||||
}
|
||||
|
|
|
@ -7,15 +7,22 @@ using namespace std;
|
|||
|
||||
namespace CalcEngine
|
||||
{
|
||||
Number::Number() noexcept : Number(1, 0, { 0 })
|
||||
Number::Number() noexcept
|
||||
: Number(1, 0, { 0 })
|
||||
{
|
||||
}
|
||||
|
||||
Number::Number(int32_t sign, int32_t exp, vector<uint32_t> const& mantissa) noexcept : m_sign{ sign }, m_exp{ exp }, m_mantissa{ mantissa }
|
||||
Number::Number(int32_t sign, int32_t exp, vector<uint32_t> const& mantissa) noexcept
|
||||
: m_sign{ sign }
|
||||
, m_exp{ exp }
|
||||
, m_mantissa{ mantissa }
|
||||
{
|
||||
}
|
||||
|
||||
Number::Number(PNUMBER p) noexcept : m_sign{ p->sign }, m_exp{ p->exp }, m_mantissa{}
|
||||
Number::Number(PNUMBER p) noexcept
|
||||
: m_sign{ p->sign }
|
||||
, m_exp{ p->exp }
|
||||
, m_mantissa{}
|
||||
{
|
||||
m_mantissa.reserve(p->cdigit);
|
||||
copy(p->mant, p->mant + p->cdigit, back_inserter(m_mantissa));
|
||||
|
|
|
@ -7,7 +7,9 @@ using namespace std;
|
|||
|
||||
namespace CalcEngine
|
||||
{
|
||||
Rational::Rational() noexcept : m_p{}, m_q{ 1, 0, { 1 } }
|
||||
Rational::Rational() noexcept
|
||||
: m_p{}
|
||||
, m_q{ 1, 0, { 1 } }
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -23,7 +25,9 @@ namespace CalcEngine
|
|||
m_q = Number(1, qExp, { 1 });
|
||||
}
|
||||
|
||||
Rational::Rational(Number const& p, Number const& q) noexcept : m_p{ p }, m_q{ q }
|
||||
Rational::Rational(Number const& p, Number const& q) noexcept
|
||||
: m_p{ p }
|
||||
, m_q{ q }
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -58,7 +62,9 @@ namespace CalcEngine
|
|||
m_q = Number{ temp.Q() };
|
||||
}
|
||||
|
||||
Rational::Rational(PRAT prat) noexcept : m_p{ Number{ prat->pp } }, m_q{ Number{ prat->pq } }
|
||||
Rational::Rational(PRAT prat) noexcept
|
||||
: m_p{ Number{ prat->pp } }
|
||||
, m_q{ Number{ prat->pq } }
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -7,7 +7,8 @@
|
|||
using namespace std;
|
||||
using namespace CalculationManager;
|
||||
|
||||
CalculatorHistory::CalculatorHistory(size_t maxSize) : m_maxHistorySize(maxSize)
|
||||
CalculatorHistory::CalculatorHistory(size_t maxSize)
|
||||
: m_maxHistorySize(maxSize)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -13,7 +13,8 @@ constexpr wchar_t chNegate = L'-';
|
|||
constexpr wchar_t chExp = L'e';
|
||||
constexpr wchar_t chPlus = L'+';
|
||||
|
||||
CParentheses::CParentheses(_In_ int command) : m_command(command)
|
||||
CParentheses::CParentheses(_In_ int command)
|
||||
: m_command(command)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -73,7 +74,8 @@ void CUnaryCommand::Accept(_In_ ISerializeCommandVisitor& commandVisitor)
|
|||
commandVisitor.Visit(*this);
|
||||
}
|
||||
|
||||
CBinaryCommand::CBinaryCommand(int command) : m_command(command)
|
||||
CBinaryCommand::CBinaryCommand(int command)
|
||||
: m_command(command)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -98,7 +100,12 @@ void CBinaryCommand::Accept(_In_ ISerializeCommandVisitor& commandVisitor)
|
|||
}
|
||||
|
||||
COpndCommand::COpndCommand(shared_ptr<CalculatorVector<int>> const& commands, bool fNegative, bool fDecimal, bool fSciFmt)
|
||||
: m_commands(commands), m_fNegative(fNegative), m_fSciFmt(fSciFmt), m_fDecimal(fDecimal), m_fInitialized(false), m_value{}
|
||||
: m_commands(commands)
|
||||
, m_fNegative(fNegative)
|
||||
, m_fSciFmt(fSciFmt)
|
||||
, m_fDecimal(fDecimal)
|
||||
, m_fInitialized(false)
|
||||
, m_value{}
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -13,7 +13,9 @@ namespace CalcEngine
|
|||
class CalcNumSec
|
||||
{
|
||||
public:
|
||||
CalcNumSec() : value(), m_isNegative(false)
|
||||
CalcNumSec()
|
||||
: value()
|
||||
, m_isNegative(false)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -41,11 +43,18 @@ namespace CalcEngine
|
|||
class CalcInput
|
||||
{
|
||||
public:
|
||||
CalcInput() : CalcInput(L'.')
|
||||
CalcInput()
|
||||
: CalcInput(L'.')
|
||||
{
|
||||
}
|
||||
|
||||
CalcInput(wchar_t decSymbol) : m_hasExponent(false), m_hasDecimal(false), m_decPtIndex(0), m_decSymbol(decSymbol), m_base(), m_exponent()
|
||||
CalcInput(wchar_t decSymbol)
|
||||
: m_hasExponent(false)
|
||||
, m_hasDecimal(false)
|
||||
, m_decPtIndex(0)
|
||||
, m_decSymbol(decSymbol)
|
||||
, m_base()
|
||||
, m_exponent()
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,8 @@ unordered_map<wstring, wchar_t> unquoteConversions;
|
|||
/// Constructor, sets up all the variables and requires a configLoader
|
||||
/// </summary>
|
||||
/// <param name="dataLoader">An instance of the IConverterDataLoader interface which we use to read in category/unit names and conversion data</param>
|
||||
UnitConverter::UnitConverter(_In_ const shared_ptr<IConverterDataLoader>& dataLoader) : UnitConverter::UnitConverter(dataLoader, nullptr)
|
||||
UnitConverter::UnitConverter(_In_ const shared_ptr<IConverterDataLoader>& dataLoader)
|
||||
: UnitConverter::UnitConverter(dataLoader, nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,11 @@ namespace UnitConversionManager
|
|||
bool isRtlLanguage,
|
||||
bool isConversionSource,
|
||||
bool isConversionTarget)
|
||||
: id(id), abbreviation(abbreviation), isConversionSource(isConversionSource), isConversionTarget(isConversionTarget), isWhimsical(false)
|
||||
: id(id)
|
||||
, abbreviation(abbreviation)
|
||||
, isConversionSource(isConversionSource)
|
||||
, isConversionTarget(isConversionTarget)
|
||||
, isWhimsical(false)
|
||||
{
|
||||
std::wstring nameValue1 = isRtlLanguage ? currencyName : countryName;
|
||||
std::wstring nameValue2 = isRtlLanguage ? countryName : currencyName;
|
||||
|
@ -82,7 +86,10 @@ namespace UnitConversionManager
|
|||
{
|
||||
}
|
||||
|
||||
Category(int id, std::wstring name, bool supportsNegative) : id(id), name(name), supportsNegative(supportsNegative)
|
||||
Category(int id, std::wstring name, bool supportsNegative)
|
||||
: id(id)
|
||||
, name(name)
|
||||
, supportsNegative(supportsNegative)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -131,7 +138,10 @@ namespace UnitConversionManager
|
|||
ConversionData()
|
||||
{
|
||||
}
|
||||
ConversionData(double ratio, double offset, bool offsetFirst) : ratio(ratio), offset(offset), offsetFirst(offsetFirst)
|
||||
ConversionData(double ratio, double offset, bool offsetFirst)
|
||||
: ratio(ratio)
|
||||
, offset(offset)
|
||||
, offsetFirst(offsetFirst)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -9,7 +9,8 @@ namespace CalculatorApp
|
|||
{
|
||||
ref class AlwaysSelectedCollectionView sealed : public Windows::UI::Xaml::DependencyObject, public Windows::UI::Xaml::Data::ICollectionView
|
||||
{
|
||||
internal : AlwaysSelectedCollectionView(Windows::UI::Xaml::Interop::IBindableVector ^ source) : m_currentPosition(-1)
|
||||
internal : AlwaysSelectedCollectionView(Windows::UI::Xaml::Interop::IBindableVector ^ source)
|
||||
: m_currentPosition(-1)
|
||||
{
|
||||
m_source = source;
|
||||
|
||||
|
|
|
@ -9,7 +9,8 @@ using namespace Windows::UI::Xaml::Automation;
|
|||
using namespace Windows::UI::Xaml::Automation::Peers;
|
||||
using namespace Windows::UI::Xaml::Controls;
|
||||
|
||||
LiveRegionHost::LiveRegionHost() : m_host(nullptr)
|
||||
LiveRegionHost::LiveRegionHost()
|
||||
: m_host(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -30,7 +30,10 @@ NarratorAnnouncement::NarratorAnnouncement(
|
|||
String ^ activityId,
|
||||
AutomationNotificationKind kind,
|
||||
AutomationNotificationProcessing processing)
|
||||
: m_announcement(announcement), m_activityId(activityId), m_kind(kind), m_processing(processing)
|
||||
: m_announcement(announcement)
|
||||
, m_activityId(activityId)
|
||||
, m_kind(kind)
|
||||
, m_processing(processing)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -10,7 +10,8 @@ using namespace Windows::UI::Xaml::Automation;
|
|||
using namespace Windows::UI::Xaml::Automation::Peers;
|
||||
using namespace Windows::UI::Xaml::Controls;
|
||||
|
||||
NotificationHost::NotificationHost() : m_host(nullptr)
|
||||
NotificationHost::NotificationHost()
|
||||
: m_host(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -18,7 +18,8 @@ namespace CalculatorApp
|
|||
PROPERTY_R(CalculatorApp::NumbersAndOperatorsEnum, Operation);
|
||||
|
||||
CalculatorButtonPressedEventArgs(Platform::String ^ feedback, CalculatorApp::NumbersAndOperatorsEnum operation)
|
||||
: m_AuditoryFeedback(feedback), m_Operation(operation)
|
||||
: m_AuditoryFeedback(feedback)
|
||||
, m_Operation(operation)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -9,7 +9,8 @@ using namespace concurrency;
|
|||
using namespace std;
|
||||
|
||||
ConversionResultTaskHelper::ConversionResultTaskHelper(unsigned int delay, const function<void()> functionToRun)
|
||||
: m_delay{ delay }, m_storedFunction{ functionToRun }
|
||||
: m_delay{ delay }
|
||||
, m_storedFunction{ functionToRun }
|
||||
{
|
||||
auto token = m_cts.get_token();
|
||||
auto delayTask = CompleteAfter(delay);
|
||||
|
|
|
@ -14,7 +14,9 @@ namespace CalculatorApp
|
|||
|
||||
typedef void (TTarget::*CommandHandlerFunc)(Platform::Object ^);
|
||||
|
||||
DelegateCommand(TTarget ^ target, CommandHandlerFunc func) : m_weakTarget(target), m_function(func)
|
||||
DelegateCommand(TTarget ^ target, CommandHandlerFunc func)
|
||||
: m_weakTarget(target)
|
||||
, m_function(func)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -18,7 +18,12 @@ public
|
|||
[Windows::UI::Xaml::Data::Bindable] public ref class DisplayExpressionToken sealed : public Windows::UI::Xaml::Data::INotifyPropertyChanged
|
||||
{
|
||||
internal : DisplayExpressionToken(Platform::String ^ token, int tokenPosition, bool fEditable, TokenType type)
|
||||
: m_Token(token), m_TokenPosition(tokenPosition), m_IsTokenEditable(fEditable), m_Type(type), m_OriginalToken(token), m_InEditMode(false)
|
||||
: m_Token(token)
|
||||
, m_TokenPosition(tokenPosition)
|
||||
, m_IsTokenEditable(fEditable)
|
||||
, m_Type(type)
|
||||
, m_OriginalToken(token)
|
||||
, m_InEditMode(false)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -7,7 +7,8 @@
|
|||
using namespace CalculatorApp::Common;
|
||||
using namespace Windows::Storage::Streams;
|
||||
|
||||
CommandDeserializer::CommandDeserializer(_In_ DataReader ^ dataReader) : m_dataReader(dataReader)
|
||||
CommandDeserializer::CommandDeserializer(_In_ DataReader ^ dataReader)
|
||||
: m_dataReader(dataReader)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -7,7 +7,8 @@
|
|||
using namespace CalculatorApp::Common;
|
||||
using namespace Windows::Storage::Streams;
|
||||
|
||||
SerializeCommandVisitor::SerializeCommandVisitor(_In_ DataWriter ^ dataWriter) : m_dataWriter(dataWriter)
|
||||
SerializeCommandVisitor::SerializeCommandVisitor(_In_ DataWriter ^ dataWriter)
|
||||
: m_dataWriter(dataWriter)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -362,7 +362,8 @@ vector<MyVirtualKey> NavCategory::GetCategoryAcceleratorKeys()
|
|||
return accelerators;
|
||||
}
|
||||
|
||||
NavCategoryGroup::NavCategoryGroup(const NavCategoryGroupInitializer& groupInitializer) : m_Categories(ref new Vector<NavCategory ^>())
|
||||
NavCategoryGroup::NavCategoryGroup(const NavCategoryGroupInitializer& groupInitializer)
|
||||
: m_Categories(ref new Vector<NavCategory ^>())
|
||||
{
|
||||
m_GroupType = groupInitializer.type;
|
||||
|
||||
|
|
|
@ -92,7 +92,10 @@ namespace CalculatorApp
|
|||
struct NavCategoryGroupInitializer
|
||||
{
|
||||
constexpr NavCategoryGroupInitializer(CategoryGroupType t, wchar_t const* h, wchar_t const* n, wchar_t const* a)
|
||||
: type(t), headerResourceKey(h), modeResourceKey(n), automationResourceKey(a)
|
||||
: type(t)
|
||||
, headerResourceKey(h)
|
||||
, modeResourceKey(n)
|
||||
, automationResourceKey(a)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -11,7 +11,10 @@ namespace CalculatorApp
|
|||
class TraceActivity
|
||||
{
|
||||
public:
|
||||
TraceActivity() : m_channel(nullptr), m_activity(nullptr), m_fields(nullptr)
|
||||
TraceActivity()
|
||||
: m_channel(nullptr)
|
||||
, m_activity(nullptr)
|
||||
, m_fields(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -19,7 +22,10 @@ namespace CalculatorApp
|
|||
winrt::Windows::Foundation::Diagnostics::LoggingChannel channel,
|
||||
std::wstring_view activityName,
|
||||
winrt::Windows::Foundation::Diagnostics::LoggingFields fields)
|
||||
: m_channel(channel), m_activityName(activityName), m_fields(fields), m_activity(nullptr)
|
||||
: m_channel(channel)
|
||||
, m_activityName(activityName)
|
||||
, m_fields(fields)
|
||||
, m_activity(nullptr)
|
||||
{
|
||||
// Write the activity's START event. Note that you must not specify keyword
|
||||
// or level for START and STOP events because they always use the activity's
|
||||
|
|
|
@ -43,7 +43,8 @@ namespace CalculatorApp
|
|||
|
||||
struct CurrencyUnitMetadata
|
||||
{
|
||||
CurrencyUnitMetadata(const std::wstring& s) : symbol(s)
|
||||
CurrencyUnitMetadata(const std::wstring& s)
|
||||
: symbol(s)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -13,7 +13,9 @@ using namespace Windows::Web::Http;
|
|||
static constexpr auto sc_MetadataUriLocalizeFor = L"https://go.microsoft.com/fwlink/?linkid=2041093&localizeFor=";
|
||||
static constexpr auto sc_RatiosUriRelativeTo = L"https://go.microsoft.com/fwlink/?linkid=2041339&localCurrency=";
|
||||
|
||||
CurrencyHttpClient::CurrencyHttpClient() : m_client(ref new HttpClient()), m_responseLanguage(L"en-US")
|
||||
CurrencyHttpClient::CurrencyHttpClient()
|
||||
: m_client(ref new HttpClient())
|
||||
, m_responseLanguage(L"en-US")
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -18,7 +18,8 @@ using namespace Windows::Globalization;
|
|||
|
||||
static constexpr bool CONVERT_WITH_OFFSET_FIRST = true;
|
||||
|
||||
UnitConverterDataLoader::UnitConverterDataLoader(GeographicRegion ^ region) : m_currentRegionCode(region->CodeTwoLetter)
|
||||
UnitConverterDataLoader::UnitConverterDataLoader(GeographicRegion ^ region)
|
||||
: m_currentRegionCode(region->CodeTwoLetter)
|
||||
{
|
||||
m_categoryList = make_shared<vector<UCM::Category>>();
|
||||
m_categoryToUnits = make_shared<UCM::CategoryToUnitVectorMap>();
|
||||
|
|
|
@ -24,7 +24,8 @@ namespace CalculatorApp
|
|||
bool isConversionSource = false,
|
||||
bool isConversionTarget = false,
|
||||
bool isWhimsical = false)
|
||||
: UnitConversionManager::Unit(id, name, abbreviation, isConversionSource, isConversionTarget, isWhimsical), order(order)
|
||||
: UnitConversionManager::Unit(id, name, abbreviation, isConversionSource, isConversionTarget, isWhimsical)
|
||||
, order(order)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -50,7 +51,10 @@ namespace CalculatorApp
|
|||
double ratio,
|
||||
double offset,
|
||||
bool offsetFirst = false)
|
||||
: categoryId(categoryId), parentUnitId(parentUnitId), unitId(unitId), UnitConversionManager::ConversionData(ratio, offset, offsetFirst)
|
||||
: categoryId(categoryId)
|
||||
, parentUnitId(parentUnitId)
|
||||
, unitId(unitId)
|
||||
, UnitConversionManager::ConversionData(ratio, offset, offsetFirst)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -15,7 +15,10 @@ HistoryItemViewModel::HistoryItemViewModel(
|
|||
String ^ result,
|
||||
_In_ const shared_ptr<CalculatorVector<pair<wstring, int>>>& spTokens,
|
||||
_In_ const shared_ptr<CalculatorVector<shared_ptr<IExpressionCommand>>>& spCommands)
|
||||
: m_expression(expression), m_result(result), m_spTokens(spTokens), m_spCommands(spCommands)
|
||||
: m_expression(expression)
|
||||
, m_result(result)
|
||||
, m_spTokens(spTokens)
|
||||
, m_spCommands(spCommands)
|
||||
{
|
||||
// updating accessibility names for expression and result
|
||||
m_accExpression = HistoryItemViewModel::GetAccessibleExpressionFromTokens(spTokens, m_expression);
|
||||
|
|
|
@ -27,7 +27,8 @@ namespace CalculatorApp::ViewModel::HistoryResourceKeys
|
|||
}
|
||||
|
||||
HistoryViewModel::HistoryViewModel(_In_ CalculationManager::CalculatorManager* calculatorManager)
|
||||
: m_calculatorManager(calculatorManager), m_localizedHistoryCleared(nullptr)
|
||||
: m_calculatorManager(calculatorManager)
|
||||
, m_localizedHistoryCleared(nullptr)
|
||||
{
|
||||
AreHistoryShortcutsEnabled = true;
|
||||
|
||||
|
|
|
@ -18,7 +18,9 @@ namespace CalculatorApp
|
|||
Windows::UI::Xaml::Data::ICustomPropertyProvider
|
||||
{
|
||||
public:
|
||||
MemoryItemViewModel(StandardCalculatorViewModel ^ calcVM) : m_Position(-1), m_calcVM(calcVM)
|
||||
MemoryItemViewModel(StandardCalculatorViewModel ^ calcVM)
|
||||
: m_Position(-1)
|
||||
, m_calcVM(calcVM)
|
||||
{
|
||||
}
|
||||
OBSERVABLE_OBJECT();
|
||||
|
|
|
@ -17,7 +17,8 @@ namespace CalculatorApp
|
|||
{
|
||||
[Windows::UI::Xaml::Data::Bindable] public ref class Category sealed : public Windows::UI::Xaml::Data::INotifyPropertyChanged
|
||||
{
|
||||
internal : Category(const UnitConversionManager::Category& category) : m_original(category)
|
||||
internal : Category(const UnitConversionManager::Category& category)
|
||||
: m_original(category)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -46,7 +47,8 @@ namespace CalculatorApp
|
|||
|
||||
[Windows::UI::Xaml::Data::Bindable] public ref class Unit sealed : public Windows::UI::Xaml::Data::INotifyPropertyChanged
|
||||
{
|
||||
internal : Unit(const UnitConversionManager::Unit& unit) : m_original(unit)
|
||||
internal : Unit(const UnitConversionManager::Unit& unit)
|
||||
: m_original(unit)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -80,7 +82,9 @@ namespace CalculatorApp
|
|||
|
||||
[Windows::UI::Xaml::Data::Bindable] public ref class SupplementaryResult sealed : public Windows::UI::Xaml::Data::INotifyPropertyChanged
|
||||
{
|
||||
internal : SupplementaryResult(Platform::String ^ value, Unit ^ unit) : m_Value(value), m_Unit(unit)
|
||||
internal : SupplementaryResult(Platform::String ^ value, Unit ^ unit)
|
||||
: m_Value(value)
|
||||
, m_Unit(unit)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -110,7 +114,8 @@ namespace CalculatorApp
|
|||
TActivatable m_activatable;
|
||||
|
||||
public:
|
||||
Activatable(TActivatable activatable) : m_activatable(activatable)
|
||||
Activatable(TActivatable activatable)
|
||||
: m_activatable(activatable)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -333,7 +338,8 @@ namespace CalculatorApp
|
|||
class UnitConverterVMCallback : public UnitConversionManager::IUnitConverterVMCallback
|
||||
{
|
||||
public:
|
||||
UnitConverterVMCallback(UnitConverterViewModel ^ viewModel) : m_viewModel(viewModel)
|
||||
UnitConverterVMCallback(UnitConverterViewModel ^ viewModel)
|
||||
: m_viewModel(viewModel)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -359,7 +365,8 @@ namespace CalculatorApp
|
|||
class ViewModelCurrencyCallback : public UnitConversionManager::IViewModelCurrencyCallback
|
||||
{
|
||||
public:
|
||||
ViewModelCurrencyCallback(UnitConverterViewModel ^ viewModel) : m_viewModel(viewModel)
|
||||
ViewModelCurrencyCallback(UnitConverterViewModel ^ viewModel)
|
||||
: m_viewModel(viewModel)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -47,7 +47,9 @@ namespace CalculatorApp
|
|||
{
|
||||
public:
|
||||
SafeFrameWindowCreation(_In_ WindowFrameService ^ frameService, App ^ parent)
|
||||
: m_frameService(frameService), m_frameOpenedInWindow(false), m_parent(parent)
|
||||
: m_frameService(frameService)
|
||||
, m_frameOpenedInWindow(false)
|
||||
, m_parent(parent)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -9,7 +9,8 @@ namespace CalculatorApp
|
|||
{
|
||||
ref class AlwaysSelectedCollectionView sealed : public Windows::UI::Xaml::DependencyObject, public Windows::UI::Xaml::Data::ICollectionView
|
||||
{
|
||||
internal : AlwaysSelectedCollectionView(Windows::UI::Xaml::Interop::IBindableVector ^ source) : m_currentPosition(-1)
|
||||
internal : AlwaysSelectedCollectionView(Windows::UI::Xaml::Interop::IBindableVector ^ source)
|
||||
: m_currentPosition(-1)
|
||||
{
|
||||
m_source = source;
|
||||
|
||||
|
|
|
@ -50,7 +50,9 @@ DEPENDENCY_PROPERTY_INITIALIZATION(CalculationResult, DisplayStringExpression);
|
|||
StringReference CalculationResult::s_FocusedState(L"Focused");
|
||||
StringReference CalculationResult::s_UnfocusedState(L"Unfocused");
|
||||
|
||||
CalculationResult::CalculationResult() : m_isScalingText(false), m_haveCalculatedMax(false)
|
||||
CalculationResult::CalculationResult()
|
||||
: m_isScalingText(false)
|
||||
, m_haveCalculatedMax(false)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -9,7 +9,8 @@ using namespace Windows::UI::Xaml::Automation::Peers;
|
|||
|
||||
namespace CalculatorApp::Controls
|
||||
{
|
||||
CalculationResultAutomationPeer::CalculationResultAutomationPeer(FrameworkElement ^ owner) : FrameworkElementAutomationPeer(owner)
|
||||
CalculationResultAutomationPeer::CalculationResultAutomationPeer(FrameworkElement ^ owner)
|
||||
: FrameworkElementAutomationPeer(owner)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -10,7 +10,8 @@ using namespace Windows::Foundation::Collections;
|
|||
|
||||
namespace CalculatorApp::Controls
|
||||
{
|
||||
OverflowTextBlockAutomationPeer::OverflowTextBlockAutomationPeer(OverflowTextBlock ^ owner) : FrameworkElementAutomationPeer(owner)
|
||||
OverflowTextBlockAutomationPeer::OverflowTextBlockAutomationPeer(OverflowTextBlock ^ owner)
|
||||
: FrameworkElementAutomationPeer(owner)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -13,7 +13,9 @@ namespace Numbers
|
|||
ref class MemorySlot sealed : public Windows::UI::Xaml::Data::INotifyPropertyChanged
|
||||
{
|
||||
public:
|
||||
MemorySlot(int slotPosition, Platform::String ^ value) : m_SlotPosition(slotPosition), m_SlotValue(value)
|
||||
MemorySlot(int slotPosition, Platform::String ^ value)
|
||||
: m_SlotPosition(slotPosition)
|
||||
, m_SlotValue(value)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -35,7 +37,10 @@ namespace Numbers
|
|||
{
|
||||
public:
|
||||
StandardCalculatorViewModel()
|
||||
: m_DisplayValue("1234569"), m_DisplayStringExpression("14560 x 1890"), m_DegreeButtonContent("Deg"), m_IsMemoryEmpty(false)
|
||||
: m_DisplayValue("1234569")
|
||||
, m_DisplayStringExpression("14560 x 1890")
|
||||
, m_DegreeButtonContent("Deg")
|
||||
, m_IsMemoryEmpty(false)
|
||||
{
|
||||
m_MemorizedNumbers = ref new Platform::Collections::Vector<MemorySlot ^>();
|
||||
for (int i = 1000; i < 1100; i++)
|
||||
|
|
|
@ -21,11 +21,15 @@ namespace Numbers
|
|||
ref class CategoryViewModel sealed : public Windows::UI::Xaml::Data::INotifyPropertyChanged
|
||||
{
|
||||
public:
|
||||
CategoryViewModel(Platform::String ^ name) : m_Name(name), m_NegateVisibility(Windows::UI::Xaml::Visibility::Collapsed)
|
||||
CategoryViewModel(Platform::String ^ name)
|
||||
: m_Name(name)
|
||||
, m_NegateVisibility(Windows::UI::Xaml::Visibility::Collapsed)
|
||||
{
|
||||
}
|
||||
|
||||
CategoryViewModel(Platform::String ^ name, Windows::UI::Xaml::Visibility negateVisibility) : m_Name(name), m_NegateVisibility(negateVisibility)
|
||||
CategoryViewModel(Platform::String ^ name, Windows::UI::Xaml::Visibility negateVisibility)
|
||||
: m_Name(name)
|
||||
, m_NegateVisibility(negateVisibility)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -39,7 +43,9 @@ namespace Numbers
|
|||
ref class UnitViewModel sealed : public Windows::UI::Xaml::Data::INotifyPropertyChanged
|
||||
{
|
||||
public:
|
||||
UnitViewModel(Platform::String ^ unit, Platform::String ^ abbr) : m_Name(unit), m_Abbreviation(abbr)
|
||||
UnitViewModel(Platform::String ^ unit, Platform::String ^ abbr)
|
||||
: m_Name(unit)
|
||||
, m_Abbreviation(abbr)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -53,7 +59,8 @@ namespace Numbers
|
|||
ref class UnitConverterSupplementaryResultViewModel sealed : public Windows::UI::Xaml::Data::INotifyPropertyChanged
|
||||
{
|
||||
public:
|
||||
UnitConverterSupplementaryResultViewModel(Platform::String ^ value, Platform::String ^ unit, Platform::String ^ abbr) : m_Value(value)
|
||||
UnitConverterSupplementaryResultViewModel(Platform::String ^ value, Platform::String ^ unit, Platform::String ^ abbr)
|
||||
: m_Value(value)
|
||||
{
|
||||
m_Unit = ref new UnitViewModel(unit, abbr);
|
||||
}
|
||||
|
@ -68,7 +75,11 @@ namespace Numbers
|
|||
ref class UnitConverterViewModel sealed : public Windows::UI::Xaml::Data::INotifyPropertyChanged
|
||||
{
|
||||
public:
|
||||
UnitConverterViewModel() : m_Value1("Åy24"), m_Value2("Åy183"), m_Value1Active(true), m_Value2Active(false)
|
||||
UnitConverterViewModel()
|
||||
: m_Value1("Åy24")
|
||||
, m_Value2("Åy183")
|
||||
, m_Value1Active(true)
|
||||
, m_Value2Active(false)
|
||||
{
|
||||
m_SupplementaryResults = ref new Platform::Collections::Vector<UnitConverterSupplementaryResultViewModel ^>();
|
||||
m_SupplementaryResults->Append(ref new UnitConverterSupplementaryResultViewModel("128", "Kilograms", "Kgs"));
|
||||
|
|
|
@ -41,7 +41,11 @@ DEPENDENCY_PROPERTY_INITIALIZATION(Calculator, IsStandard);
|
|||
DEPENDENCY_PROPERTY_INITIALIZATION(Calculator, IsScientific);
|
||||
DEPENDENCY_PROPERTY_INITIALIZATION(Calculator, IsProgrammer);
|
||||
|
||||
Calculator::Calculator() : m_doAnimate(false), m_isLastAnimatedInScientific(false), m_isLastAnimatedInProgrammer(false), m_resultAnimate(false)
|
||||
Calculator::Calculator()
|
||||
: m_doAnimate(false)
|
||||
, m_isLastAnimatedInScientific(false)
|
||||
, m_isLastAnimatedInProgrammer(false)
|
||||
, m_resultAnimate(false)
|
||||
{
|
||||
SetFontSizeResources();
|
||||
InitializeComponent();
|
||||
|
|
|
@ -25,7 +25,8 @@ using namespace Windows::UI::Xaml::Input;
|
|||
|
||||
// The User Control item template is documented at https://go.microsoft.com/fwlink/?LinkId=234236
|
||||
|
||||
CalculatorProgrammerBitFlipPanel::CalculatorProgrammerBitFlipPanel() : m_updatingCheckedStates(false)
|
||||
CalculatorProgrammerBitFlipPanel::CalculatorProgrammerBitFlipPanel()
|
||||
: m_updatingCheckedStates(false)
|
||||
{
|
||||
InitializeComponent();
|
||||
auto booleanToVisibilityConverter = ref new Converters::BooleanToVisibilityConverter;
|
||||
|
|
|
@ -20,7 +20,8 @@ using namespace Windows::UI::Xaml::Navigation;
|
|||
using namespace Windows::UI::ViewManagement;
|
||||
using namespace Windows::UI::Core;
|
||||
|
||||
CalculatorProgrammerDisplayPanel::CalculatorProgrammerDisplayPanel() : m_isErrorVisualState(false)
|
||||
CalculatorProgrammerDisplayPanel::CalculatorProgrammerDisplayPanel()
|
||||
: m_isErrorVisualState(false)
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
|
|
@ -23,7 +23,8 @@ using namespace Windows::UI::Xaml::Data;
|
|||
using namespace CalculatorApp::Common;
|
||||
using namespace Windows::UI::Xaml::Media;
|
||||
|
||||
CalculatorProgrammerRadixOperators::CalculatorProgrammerRadixOperators() : m_isErrorVisualState(false)
|
||||
CalculatorProgrammerRadixOperators::CalculatorProgrammerRadixOperators()
|
||||
: m_isErrorVisualState(false)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
|
|
|
@ -29,7 +29,8 @@ using namespace Windows::UI::Core;
|
|||
|
||||
// The User Control item template is documented at https://go.microsoft.com/fwlink/?LinkId=234236
|
||||
|
||||
CalculatorScientificAngleButtons::CalculatorScientificAngleButtons() : m_isErrorVisualState(false)
|
||||
CalculatorScientificAngleButtons::CalculatorScientificAngleButtons()
|
||||
: m_isErrorVisualState(false)
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
|
|
@ -24,7 +24,8 @@ using namespace Windows::UI::Xaml::Navigation;
|
|||
|
||||
// The User Control item template is documented at https://go.microsoft.com/fwlink/?LinkId=234236
|
||||
|
||||
CalculatorStandardOperators::CalculatorStandardOperators() : m_isErrorVisualState(false)
|
||||
CalculatorStandardOperators::CalculatorStandardOperators()
|
||||
: m_isErrorVisualState(false)
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
|
|
@ -63,7 +63,8 @@ namespace CalculatorApp::VisualStates
|
|||
}
|
||||
}
|
||||
|
||||
MainPage::MainPage() : m_model(ref new ApplicationViewModel())
|
||||
MainPage::MainPage()
|
||||
: m_model(ref new ApplicationViewModel())
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
|
|
|
@ -35,7 +35,8 @@ using namespace Windows::UI::ViewManagement;
|
|||
|
||||
DEPENDENCY_PROPERTY_INITIALIZATION(Memory, RowHeight);
|
||||
|
||||
Memory::Memory() : m_isErrorVisualState(false)
|
||||
Memory::Memory()
|
||||
: m_isErrorVisualState(false)
|
||||
{
|
||||
InitializeComponent();
|
||||
m_memoryItemFlyout = safe_cast<MenuFlyout ^>(Resources->Lookup("MemoryContextMenu"));
|
||||
|
|
|
@ -31,7 +31,8 @@ using namespace CalculatorApp::Common;
|
|||
|
||||
DEPENDENCY_PROPERTY_INITIALIZATION(NumberPad, ButtonStyle);
|
||||
|
||||
NumberPad::NumberPad() : m_isErrorVisualState(false)
|
||||
NumberPad::NumberPad()
|
||||
: m_isErrorVisualState(false)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
|
|
|
@ -20,7 +20,8 @@ using namespace Windows::Foundation::Collections;
|
|||
|
||||
namespace CalculatorApp
|
||||
{
|
||||
TitleBar::TitleBar() : m_coreTitleBar(CoreApplication::GetCurrentView()->TitleBar)
|
||||
TitleBar::TitleBar()
|
||||
: m_coreTitleBar(CoreApplication::GetCurrentView()->TitleBar)
|
||||
{
|
||||
m_uiSettings = ref new UISettings();
|
||||
m_accessibilitySettings = ref new AccessibilitySettings();
|
||||
|
|
|
@ -45,7 +45,9 @@ using namespace Windows::UI::ViewManagement;
|
|||
// There are 10,000 intervals in 1 ms.
|
||||
static const long long DURATION_500_MS = 10000 * 500;
|
||||
|
||||
UnitConverter::UnitConverter() : m_meteredConnectionOverride(false), m_isAnimationEnabled(false)
|
||||
UnitConverter::UnitConverter()
|
||||
: m_meteredConnectionOverride(false)
|
||||
, m_isAnimationEnabled(false)
|
||||
{
|
||||
m_layoutDirection = LocalizationService::GetInstance()->GetFlowDirection();
|
||||
m_FlowDirectionHorizontalAlignment = m_layoutDirection == ::FlowDirection::RightToLeft ? ::HorizontalAlignment::Right : ::HorizontalAlignment::Left;
|
||||
|
|
|
@ -29,7 +29,8 @@ namespace CalculatorApp
|
|||
{
|
||||
public:
|
||||
MockCurrencyHttpClientWithResult(String ^ staticResponse, String ^ allRatiosResponse)
|
||||
: m_staticResponse(staticResponse), m_allRatiosResponse(allRatiosResponse)
|
||||
: m_staticResponse(staticResponse)
|
||||
, m_allRatiosResponse(allRatiosResponse)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -71,7 +72,8 @@ namespace CalculatorApp
|
|||
class DataLoadedCallback : public UnitConversionManager::IViewModelCurrencyCallback
|
||||
{
|
||||
public:
|
||||
DataLoadedCallback(task_completion_event<void> tce) : m_task_completion_event{ tce }
|
||||
DataLoadedCallback(task_completion_event<void> tce)
|
||||
: m_task_completion_event{ tce }
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -42,7 +42,8 @@ IAsyncOperationWithProgress<String ^, HttpProgress> ^ CurrencyHttpClient::GetCur
|
|||
return ref new MockAsyncOperationWithProgress(StringReference(ALL_RATIOS_RESPONSE));
|
||||
}
|
||||
|
||||
MockAsyncOperationWithProgress::MockAsyncOperationWithProgress(String ^ result) : m_result(result)
|
||||
MockAsyncOperationWithProgress::MockAsyncOperationWithProgress(String ^ result)
|
||||
: m_result(result)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -38,7 +38,8 @@ namespace UnitConverterUnitTests
|
|||
class TestUnitConverterConfigLoader : public IConverterDataLoader
|
||||
{
|
||||
public:
|
||||
TestUnitConverterConfigLoader() : m_loadDataCallCount(0)
|
||||
TestUnitConverterConfigLoader()
|
||||
: m_loadDataCallCount(0)
|
||||
{
|
||||
Category c1, c2;
|
||||
SetCategoryParams(&c1, 1, L"Length", true);
|
||||
|
|
|
@ -262,7 +262,8 @@ private:
|
|||
bool m_active;
|
||||
|
||||
public:
|
||||
MockActivatable(bool active) : m_active(active)
|
||||
MockActivatable(bool active)
|
||||
: m_active(active)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue