mirror of
https://github.com/Microsoft/calculator.git
synced 2025-07-16 02:02:51 -07:00
Removing Utils::Swap and using std::swap instead (#932)
This commit is contained in:
parent
ca0b3d83e8
commit
52de42e7fb
3 changed files with 2 additions and 18 deletions
|
@ -372,14 +372,6 @@ namespace Utils
|
||||||
ref new Windows::UI::Xaml::PropertyChangedCallback(callback)));
|
ref new Windows::UI::Xaml::PropertyChangedCallback(callback)));
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
void Swap(T *ref1, T *ref2)
|
|
||||||
{
|
|
||||||
T temp = *ref1;
|
|
||||||
*ref1 = *ref2;
|
|
||||||
*ref2 = temp;
|
|
||||||
}
|
|
||||||
|
|
||||||
void IFTPlatformException(HRESULT hr);
|
void IFTPlatformException(HRESULT hr);
|
||||||
Platform::String ^ GetStringValue(Platform::String ^ input);
|
Platform::String ^ GetStringValue(Platform::String ^ input);
|
||||||
bool IsLastCharacterTarget(std::wstring const& input, wchar_t target);
|
bool IsLastCharacterTarget(std::wstring const& input, wchar_t target);
|
||||||
|
|
|
@ -264,9 +264,9 @@ void UnitConverterViewModel::OnSwitchActive(Platform::Object ^ unused)
|
||||||
}
|
}
|
||||||
|
|
||||||
m_valueFromUnlocalized.swap(m_valueToUnlocalized);
|
m_valueFromUnlocalized.swap(m_valueToUnlocalized);
|
||||||
Utils::Swap(&m_localizedValueFromFormat, &m_localizedValueToFormat);
|
swap(m_localizedValueFromFormat, m_localizedValueToFormat);
|
||||||
|
|
||||||
Utils::Swap(&m_Unit1AutomationName, &m_Unit2AutomationName);
|
swap(m_Unit1AutomationName, m_Unit2AutomationName);
|
||||||
RaisePropertyChanged(Unit1AutomationNamePropertyName);
|
RaisePropertyChanged(Unit1AutomationNamePropertyName);
|
||||||
RaisePropertyChanged(Unit2AutomationNamePropertyName);
|
RaisePropertyChanged(Unit2AutomationNamePropertyName);
|
||||||
|
|
||||||
|
|
|
@ -349,14 +349,6 @@ namespace Utils
|
||||||
defaultValue,
|
defaultValue,
|
||||||
ref new Windows::UI::Xaml::PropertyChangedCallback(callback)));
|
ref new Windows::UI::Xaml::PropertyChangedCallback(callback)));
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
void Swap(T *ref1, T *ref2)
|
|
||||||
{
|
|
||||||
T temp = *ref1;
|
|
||||||
*ref1 = *ref2;
|
|
||||||
*ref2 = temp;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// This goes into the header to define the property, in the public: section of the class
|
// This goes into the header to define the property, in the public: section of the class
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue