Skip to content

Commit

Permalink
Suppress false positive in MSVC
Browse files Browse the repository at this point in the history
  • Loading branch information
Blake-Madden committed Dec 28, 2023
1 parent 64f47a8 commit 674cc76
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/i18n_review.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

#include "i18n_review.h"

#pragma warning(disable : 26478)

using namespace i18n_string_util;

namespace i18n_check
Expand Down
7 changes: 6 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
#include <numeric>
#include <sstream>

// "Don't use std::move on constant variables." false positive in MSVC
// is issued from strucutured binding assignment.
#pragma warning(disable : 26478)

namespace fs = std::filesystem;
using namespace i18n_check;
using namespace string_util;
Expand Down Expand Up @@ -75,7 +79,8 @@ static bool valid_utf8_file(const std::string& file_name, bool& startsWithBom)
}

//-------------------------------------------------
static std::pair<bool, std::wstring> read_utf8_file(const std::string& file_name, bool& startsWithBom)
static std::pair<bool, std::wstring> read_utf8_file(const std::string& file_name,
bool& startsWithBom)
{
if (!valid_utf8_file(file_name, startsWithBom))
{
Expand Down

0 comments on commit 674cc76

Please sign in to comment.