Merge pull request #7839 from ShFil119/impr/redundant

Remove redundant initialization
This commit is contained in:
Léo Lam
2019-05-04 22:50:51 +02:00
committed by GitHub
17 changed files with 25 additions and 25 deletions

View File

@ -83,7 +83,7 @@ std::string HostDisassemblerLLVM::DisassembleHostBlock(const u8* code_start, con
{
// If we are on an architecture that has a fixed instruction size
// We can continue onward past this bad instruction.
std::string inst_str = "";
std::string inst_str;
for (int i = 0; i < m_instruction_size; ++i)
inst_str += StringFromFormat("%02x", disasmPtr[i]);
@ -94,7 +94,7 @@ std::string HostDisassemblerLLVM::DisassembleHostBlock(const u8* code_start, con
{
// We can't continue if we are on an architecture that has flexible instruction sizes
// Dump the rest of the block instead
std::string code_block = "";
std::string code_block;
for (int i = 0; (disasmPtr + i) < end; ++i)
code_block += StringFromFormat("%02x", disasmPtr[i]);

View File

@ -194,7 +194,7 @@ void SetUserDirectory(const std::string& custom_path)
return;
}
std::string user_path = "";
std::string user_path;
#ifdef _WIN32
// Detect where the User directory is. There are five different cases
// (on top of the command line flag, which overrides all this):