Skip to content

Commit

Permalink
Suppress 26445 inside til::at
Browse files Browse the repository at this point in the history
  • Loading branch information
skyline75489 committed Oct 10, 2020
1 parent 1d7593c commit 1cb8106
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/inc/til/at.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ namespace til
{
#pragma warning(suppress : 26482) // Suppress bounds.2 check for indexing with constant expressions
#pragma warning(suppress : 26446) // Suppress bounds.4 check for subscript operator.
#pragma warning(suppress : 26445) // Suppress lifetime check for a reference to gsl::span or std::string_view
return cont[i];
}

Expand Down
6 changes: 3 additions & 3 deletions src/terminal/parser/OutputStateMachineEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1391,8 +1391,8 @@ try
for (size_t i = 0, j = 1; j < parts.size(); i += 2, j += 2)
{
unsigned int tableIndex = 0;
const bool indexSuccess = Utils::StringToUint(parts.at(i), tableIndex);
const auto colorOptional = Utils::ColorFromXTermColor(parts.at(j));
const bool indexSuccess = Utils::StringToUint(til::at(parts, i), tableIndex);
const auto colorOptional = Utils::ColorFromXTermColor(til::at(parts, j));
if (indexSuccess && colorOptional.has_value())
{
newTableIndexes.push_back(tableIndex);
Expand Down Expand Up @@ -1475,7 +1475,7 @@ try
std::vector<DWORD> newRgbs;
for (size_t i = 0; i < parts.size(); i++)
{
const auto colorOptional = Utils::ColorFromXTermColor(parts.at(i));
const auto colorOptional = Utils::ColorFromXTermColor(til::at(parts, i));
if (colorOptional.has_value())
{
newRgbs.push_back(colorOptional.value());
Expand Down

0 comments on commit 1cb8106

Please sign in to comment.