Skip to content

Commit

Permalink
Fix GCC compile error
Browse files Browse the repository at this point in the history
  • Loading branch information
Blake-Madden committed Aug 18, 2024
1 parent 9787d96 commit 7b54d19
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/analyze.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ namespace i18n_check
bool valid_utf8_file(const std::wstring& file_name, bool& startsWithBom)
{
startsWithBom = false;
std::wifstream ifs(file_name.c_str());
std::ifstream ifs(file_name);
if (!ifs)
{
return false;
}

std::istreambuf_iterator<wchar_t> it(ifs.rdbuf());
std::istreambuf_iterator<wchar_t> eos;
std::istreambuf_iterator<char> it(ifs.rdbuf());
std::istreambuf_iterator<char> eos;

if (utf8::starts_with_bom(it, eos))
{
Expand Down

0 comments on commit 7b54d19

Please sign in to comment.