C26462, const local variables that are unchanged.

This commit is contained in:
Michael Niksa 2019-09-03 10:04:30 -07:00
parent d5d7cf420d
commit bbdfdf91eb
2 changed files with 5 additions and 5 deletions

View file

@ -44,7 +44,7 @@ using namespace Microsoft::Console::Render;
{
RETURN_HR_IF_NULL(E_INVALIDARG, pixelsPerDip);
DrawingContext* drawingContext = static_cast<DrawingContext*>(clientDrawingContext);
const DrawingContext* drawingContext = static_cast<DrawingContext*>(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<DrawingContext*>(clientDrawingContext);
const DrawingContext* drawingContext = static_cast<DrawingContext*>(clientDrawingContext);
RETURN_HR_IF_NULL(E_INVALIDARG, drawingContext);
// Matrix structures are defined identically

View file

@ -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<UiaTextRangeBase*>(pRange);
const UiaTextRangeBase* other = static_cast<UiaTextRangeBase*>(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<UiaTextRangeBase*>(pTargetRange);
const UiaTextRangeBase* range = static_cast<UiaTextRangeBase*>(pTargetRange);
if (range == nullptr)
{
return E_INVALIDARG;
@ -743,7 +743,7 @@ IFACEMETHODIMP UiaTextRangeBase::MoveEndpointByRange(_In_ TextPatternRangeEndpoi
_pData->UnlockConsole();
});
UiaTextRangeBase* range = static_cast<UiaTextRangeBase*>(pTargetRange);
const UiaTextRangeBase* range = static_cast<UiaTextRangeBase*>(pTargetRange);
if (range == nullptr)
{
return E_INVALIDARG;