Skip to content

Commit

Permalink
Added noexcept modifiers for cppwinrt (#529)
Browse files Browse the repository at this point in the history
  • Loading branch information
aborziak-ms authored Feb 28, 2023
1 parent 56f986c commit 767465b
Showing 1 changed file with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1575,14 +1575,14 @@ internal CodeBuilder ToCodeBuilder()
winrt::com_ptr<ID2D1Geometry> Geometry() { return _geometry; }
// IGeometrySource2DInterop.
IFACEMETHODIMP GetGeometry(ID2D1Geometry** value) override
IFACEMETHODIMP GetGeometry(ID2D1Geometry** value) noexcept(true) override
{
_geometry.copy_to(value);
return S_OK;
}
// IGeometrySource2DInterop.
IFACEMETHODIMP TryGetGeometryUsingFactory(ID2D1Factory*, ID2D1Geometry**) override
IFACEMETHODIMP TryGetGeometryUsingFactory(ID2D1Factory*, ID2D1Geometry**) noexcept(true) override
{
return E_NOTIMPL;
}
Expand Down Expand Up @@ -1633,7 +1633,7 @@ void AddSource(winrt::Windows::Graphics::Effects::IGraphicsEffectSource source)
winrt::hstring Name() { return m_name; }
// IGraphicsEffectD2D1Interop.
IFACEMETHODIMP GetEffectId(GUID* id) override
IFACEMETHODIMP GetEffectId(GUID* id) noexcept(true) override
{
if (id != nullptr)
{
Expand All @@ -1645,7 +1645,7 @@ IFACEMETHODIMP GetEffectId(GUID* id) override
}
// IGraphicsEffectD2D1Interop.
IFACEMETHODIMP GetSourceCount(UINT* count) override
IFACEMETHODIMP GetSourceCount(UINT* count) noexcept(true) override
{
if (count != nullptr)
{
Expand All @@ -1658,7 +1658,7 @@ IFACEMETHODIMP GetSourceCount(UINT* count) override
// IGraphicsEffectD2D1Interop.
IFACEMETHODIMP GetSource(
UINT index,
::ABI::Windows::Graphics::Effects::IGraphicsEffectSource** source) override
::ABI::Windows::Graphics::Effects::IGraphicsEffectSource** source) noexcept(true) override
{
if (index >= m_sources.size() ||
source == nullptr)
Expand All @@ -1672,12 +1672,12 @@ IFACEMETHODIMP GetSource(
}
// IGraphicsEffectD2D1Interop.
IFACEMETHODIMP GetPropertyCount(UINT* count) override { *count = 1; return S_OK; }
IFACEMETHODIMP GetPropertyCount(UINT* count) noexcept(true) override { *count = 1; return S_OK; }
// IGraphicsEffectD2D1Interop.
IFACEMETHODIMP GetProperty(
UINT index,
::ABI::Windows::Foundation::IPropertyValue** value) override
::ABI::Windows::Foundation::IPropertyValue** value) noexcept(true) override
{
switch (index)
{
Expand Down Expand Up @@ -1726,7 +1726,7 @@ class GaussianBlurEffect : public winrt::implements<GaussianBlurEffect,
winrt::hstring Name() { return m_name; }
// IGraphicsEffectD2D1Interop.
IFACEMETHODIMP GetEffectId(GUID* id) override
IFACEMETHODIMP GetEffectId(GUID* id) noexcept(true) override
{
if (id != nullptr)
{
Expand All @@ -1738,7 +1738,7 @@ IFACEMETHODIMP GetEffectId(GUID* id) override
}
// IGraphicsEffectD2D1Interop.
IFACEMETHODIMP GetSourceCount(UINT* count) override
IFACEMETHODIMP GetSourceCount(UINT* count) noexcept(true) override
{
if (count != nullptr)
{
Expand All @@ -1751,7 +1751,7 @@ IFACEMETHODIMP GetSourceCount(UINT* count) override
// IGraphicsEffectD2D1Interop.
IFACEMETHODIMP GetSource(
UINT index,
::ABI::Windows::Graphics::Effects::IGraphicsEffectSource** source) override
::ABI::Windows::Graphics::Effects::IGraphicsEffectSource** source) noexcept(true) override
{
if (index != 0 ||
source == nullptr)
Expand All @@ -1765,12 +1765,12 @@ IFACEMETHODIMP GetSource(
}
// IGraphicsEffectD2D1Interop.
IFACEMETHODIMP GetPropertyCount(UINT* count) override { *count = 3; return S_OK; }
IFACEMETHODIMP GetPropertyCount(UINT* count) noexcept(true) override { *count = 3; return S_OK; }
// IGraphicsEffectD2D1Interop.
IFACEMETHODIMP GetProperty(
UINT index,
::ABI::Windows::Foundation::IPropertyValue** value) override
::ABI::Windows::Foundation::IPropertyValue** value) noexcept(true) override
{
switch (index)
{
Expand Down Expand Up @@ -1799,7 +1799,7 @@ IFACEMETHODIMP GetProperty(
IFACEMETHODIMP GetNamedPropertyMapping(
LPCWSTR,
UINT*,
::ABI::Windows::Graphics::Effects::GRAPHICS_EFFECT_PROPERTY_MAPPING*) override
::ABI::Windows::Graphics::Effects::GRAPHICS_EFFECT_PROPERTY_MAPPING*) noexcept(true) override
{
return E_INVALIDARG;
}
Expand Down

0 comments on commit 767465b

Please # to comment.