mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-26 06:18:32 +00:00
Common/FileUtil: Make WriteStringToFile consistent with ReadFileToString
Makes the parameter ordering consistent and less error-prone.
This commit is contained in:
parent
992c8bfc4e
commit
eb475025b8
6 changed files with 13 additions and 13 deletions
|
@ -217,7 +217,7 @@ static void PrintResults(const std::string& input_name, const std::string& outpu
|
|||
if (output_name.empty())
|
||||
printf("%s", results.c_str());
|
||||
else
|
||||
File::WriteStringToFile(results, output_name.c_str());
|
||||
File::WriteStringToFile(output_name, results);
|
||||
}
|
||||
|
||||
static bool PerformDisassembly(const std::string& input_name, const std::string& output_name)
|
||||
|
@ -237,7 +237,7 @@ static bool PerformDisassembly(const std::string& input_name, const std::string&
|
|||
if (output_name.empty())
|
||||
printf("%s", text.c_str());
|
||||
else
|
||||
File::WriteStringToFile(text, output_name);
|
||||
File::WriteStringToFile(output_name, text);
|
||||
|
||||
printf("Disassembly completed successfully!\n");
|
||||
return true;
|
||||
|
@ -314,7 +314,7 @@ static bool PerformAssembly(const std::string& input_name, const std::string& ou
|
|||
}
|
||||
|
||||
const std::string header = CodesToHeader(codes, files);
|
||||
File::WriteStringToFile(header, output_header_name + ".h");
|
||||
File::WriteStringToFile(output_header_name + ".h", header);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -334,12 +334,12 @@ static bool PerformAssembly(const std::string& input_name, const std::string& ou
|
|||
if (!output_name.empty())
|
||||
{
|
||||
const std::string binary_code = DSP::CodeToBinaryStringBE(code);
|
||||
File::WriteStringToFile(binary_code, output_name);
|
||||
File::WriteStringToFile(output_name, binary_code);
|
||||
}
|
||||
if (!output_header_name.empty())
|
||||
{
|
||||
const std::string header = CodeToHeader(code, input_name);
|
||||
File::WriteStringToFile(header, output_header_name + ".h");
|
||||
File::WriteStringToFile(output_header_name + ".h", header);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue