Skip to content

Commit

Permalink
use narrow_cast
Browse files Browse the repository at this point in the history
  • Loading branch information
tusharsnx committed Jul 13, 2023
1 parent edecf0a commit 15b2c6e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/terminal/parser/stateMachine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ void StateMachine::_ActionParam(const wchar_t wch)
if (_parameters.empty())
{
_parameters.push_back({});
const auto rangeStart = gsl::narrow<BYTE>(_subParameters.size());
const auto rangeStart = gsl::narrow_cast<BYTE>(_subParameters.size());
_subParameterRanges.push_back({ rangeStart, rangeStart });
}

Expand All @@ -528,7 +528,7 @@ void StateMachine::_ActionParam(const wchar_t wch)
_parameters.push_back({});
_subParameterCounter = 0;
_subParameterLimitOverflowed = false;
const auto rangeStart = gsl::narrow<BYTE>(_subParameters.size());
const auto rangeStart = gsl::narrow_cast<BYTE>(_subParameters.size());
_subParameterRanges.push_back({ rangeStart, rangeStart });
}
}
Expand Down Expand Up @@ -561,7 +561,7 @@ void StateMachine::_ActionSubParam(const wchar_t wch)
if (_parameters.empty())
{
_parameters.push_back({});
const auto rangeStart = gsl::narrow<BYTE>(_subParameters.size());
const auto rangeStart = gsl::narrow_cast<BYTE>(_subParameters.size());
_subParameterRanges.push_back({ rangeStart, rangeStart });
}

Expand Down

0 comments on commit 15b2c6e

Please sign in to comment.