Skip to content
Permalink
Browse files

Merge pull request #8004 from jordan-woyak/u8-literal

Fix u8 string literal C++20 compile error.
  • Loading branch information...
delroth committed Apr 16, 2019
2 parents f1620f2 + 1d024c8 commit 5c5e6df0380c518d098f20d9ffc832887782335c
Showing with 5 additions and 2 deletions.
  1. +5 −2 Source/Core/Core/Boot/Boot.cpp
@@ -76,10 +76,13 @@ static std::vector<std::string> ReadM3UFile(const std::string& m3u_path,
std::string line;
while (std::getline(s, line))
{
if (StringBeginsWith(line, u8"\uFEFF"))
// This is the UTF-8 representation of U+FEFF.
const std::string utf8_bom = "\xEF\xBB\xBF";

if (StringBeginsWith(line, utf8_bom))
{
WARN_LOG(BOOT, "UTF-8 BOM in file: %s", m3u_path.c_str());
line.erase(0, 3);
line.erase(0, utf8_bom.length());
}

if (!line.empty() && line.front() != '#') // Comments start with #

0 comments on commit 5c5e6df

Please sign in to comment.
You can’t perform that action at this time.