Skip to content

Commit

Permalink
use auto and narrow cast for loop
Browse files Browse the repository at this point in the history
  • Loading branch information
javierdlg committed Feb 20, 2025
1 parent 2bdda86 commit c8fbc83
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/terminal/adapter/charsets.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ namespace Microsoft::Console::VirtualTerminal
public:
constexpr CharSet(const std::initializer_list<std::pair<wchar_t, wchar_t>> replacements)
{
for (wchar_t i = L'\0'; i < _translationTable.size(); i++)
for (auto i = L'\0'; i < gsl::narrow_cast<wchar_t>(_translationTable.size()); i++)
_translationTable.at(i) = BaseChar + i;
for (auto replacement : replacements)
_translationTable.at(replacement.first - BaseChar) = replacement.second;
Expand Down

0 comments on commit c8fbc83

Please # to comment.