mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 13:27:45 -07:00
Merge 3560dce0d6
into 2c92e5b5b3
This commit is contained in:
commit
d9526019df
@ -250,17 +250,9 @@ bool IniFile::Load(const std::string& filename, bool keep_current_data)
|
||||
|
||||
Section* current_section = nullptr;
|
||||
bool first_line = true;
|
||||
while (!in.eof())
|
||||
{
|
||||
std::string line_str;
|
||||
if (!std::getline(in, line_str))
|
||||
while (std::getline(in, line_str))
|
||||
{
|
||||
if (in.eof())
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
std::string_view line = line_str;
|
||||
|
||||
// Skips the UTF-8 BOM at the start of files. Notepad likes to add this.
|
||||
|
@ -776,14 +776,11 @@ bool DSPAssembler::AssemblePass(const std::string& text, int pass)
|
||||
m_location.line_num = 0;
|
||||
m_cur_pass = pass;
|
||||
|
||||
#define LINEBUF_SIZE 1024
|
||||
char line[LINEBUF_SIZE] = {0};
|
||||
while (!m_failed && !fsrc.fail() && !fsrc.eof())
|
||||
constexpr int LINEBUF_SIZE = 1024;
|
||||
char line[LINEBUF_SIZE] = {};
|
||||
while (!m_failed && fsrc.getline(line, LINEBUF_SIZE))
|
||||
{
|
||||
int opcode_size = 0;
|
||||
fsrc.getline(line, LINEBUF_SIZE);
|
||||
if (fsrc.fail())
|
||||
break;
|
||||
|
||||
m_location.line_text = line;
|
||||
m_location.line_num++;
|
||||
|
@ -137,10 +137,8 @@ void PostProcessingConfiguration::LoadOptions(const std::string& code)
|
||||
|
||||
std::vector<GLSLStringOption> option_strings;
|
||||
GLSLStringOption* current_strings = nullptr;
|
||||
while (!in.eof())
|
||||
{
|
||||
std::string line_str;
|
||||
if (std::getline(in, line_str))
|
||||
while (std::getline(in, line_str))
|
||||
{
|
||||
std::string_view line = line_str;
|
||||
|
||||
@ -177,7 +175,6 @@ void PostProcessingConfiguration::LoadOptions(const std::string& code)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (const auto& it : option_strings)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user