diff --git a/src/renderer/dx/CustomTextRenderer.cpp b/src/renderer/dx/CustomTextRenderer.cpp index 70b41e727..b2697abf9 100644 --- a/src/renderer/dx/CustomTextRenderer.cpp +++ b/src/renderer/dx/CustomTextRenderer.cpp @@ -44,7 +44,7 @@ using namespace Microsoft::Console::Render; { RETURN_HR_IF_NULL(E_INVALIDARG, pixelsPerDip); - DrawingContext* drawingContext = static_cast(clientDrawingContext); + const DrawingContext* drawingContext = static_cast(clientDrawingContext); RETURN_HR_IF_NULL(E_INVALIDARG, drawingContext); float dpiX, dpiY; @@ -67,7 +67,7 @@ using namespace Microsoft::Console::Render; { RETURN_HR_IF_NULL(E_INVALIDARG, transform); - DrawingContext* drawingContext = static_cast(clientDrawingContext); + const DrawingContext* drawingContext = static_cast(clientDrawingContext); RETURN_HR_IF_NULL(E_INVALIDARG, drawingContext); // Matrix structures are defined identically diff --git a/src/types/UiaTextRangeBase.cpp b/src/types/UiaTextRangeBase.cpp index d01cde5fd..9fa00dd78 100644 --- a/src/types/UiaTextRangeBase.cpp +++ b/src/types/UiaTextRangeBase.cpp @@ -294,7 +294,7 @@ IFACEMETHODIMP UiaTextRangeBase::Compare(_In_opt_ ITextRangeProvider* pRange, _O RETURN_HR_IF(E_INVALIDARG, pRetVal == nullptr); *pRetVal = FALSE; - UiaTextRangeBase* other = static_cast(pRange); + const UiaTextRangeBase* other = static_cast(pRange); if (other) { *pRetVal = !!(_start == other->GetStart() && @@ -320,7 +320,7 @@ IFACEMETHODIMP UiaTextRangeBase::CompareEndpoints(_In_ TextPatternRangeEndpoint *pRetVal = 0; // get the text range that we're comparing to - UiaTextRangeBase* range = static_cast(pTargetRange); + const UiaTextRangeBase* range = static_cast(pTargetRange); if (range == nullptr) { return E_INVALIDARG; @@ -743,7 +743,7 @@ IFACEMETHODIMP UiaTextRangeBase::MoveEndpointByRange(_In_ TextPatternRangeEndpoi _pData->UnlockConsole(); }); - UiaTextRangeBase* range = static_cast(pTargetRange); + const UiaTextRangeBase* range = static_cast(pTargetRange); if (range == nullptr) { return E_INVALIDARG;