mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-08 21:53:31 +01:00
HLE_OS: Resolve -Wshadow warnings
We get a warning about shadowing the va_list type and just run-of-the-mill variable shadowing, which we can easily fix.
This commit is contained in:
parent
a812a1f938
commit
81d5370141
@ -215,8 +215,8 @@ namespace
|
|||||||
class HLEPrintArgsVAList final : public HLEPrintArgs
|
class HLEPrintArgsVAList final : public HLEPrintArgs
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
HLEPrintArgsVAList(const Core::CPUThreadGuard& guard, HLE::SystemVABI::VAList* va_list)
|
HLEPrintArgsVAList(const Core::CPUThreadGuard& guard, HLE::SystemVABI::VAList* list)
|
||||||
: m_guard(guard), m_va_list(va_list)
|
: m_guard(guard), m_va_list(list)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -305,15 +305,15 @@ std::string GetStringVA(HLEPrintArgs* args, std::string_view string)
|
|||||||
if (string[i] == '*')
|
if (string[i] == '*')
|
||||||
{
|
{
|
||||||
++i;
|
++i;
|
||||||
const s32 result = Common::BitCast<s32>(args->GetU32());
|
const s32 result_tmp = Common::BitCast<s32>(args->GetU32());
|
||||||
if (result >= 0)
|
if (result_tmp >= 0)
|
||||||
return static_cast<u32>(result);
|
return static_cast<u32>(result_tmp);
|
||||||
|
|
||||||
if (left_justified_flag_ptr)
|
if (left_justified_flag_ptr)
|
||||||
{
|
{
|
||||||
// field width; this results in positive field width and left_justified flag set
|
// field width; this results in positive field width and left_justified flag set
|
||||||
*left_justified_flag_ptr = true;
|
*left_justified_flag_ptr = true;
|
||||||
return static_cast<u32>(-static_cast<s64>(result));
|
return static_cast<u32>(-static_cast<s64>(result_tmp));
|
||||||
}
|
}
|
||||||
|
|
||||||
// precision; this is ignored
|
// precision; this is ignored
|
||||||
@ -329,10 +329,10 @@ std::string GetStringVA(HLEPrintArgs* args, std::string_view string)
|
|||||||
++start;
|
++start;
|
||||||
if (start == i)
|
if (start == i)
|
||||||
return 0;
|
return 0;
|
||||||
u32 result = 0;
|
u32 result_tmp = 0;
|
||||||
const std::string tmp(string, start, i - start);
|
const std::string tmp(string, start, i - start);
|
||||||
if (TryParse(tmp, &result, 10))
|
if (TryParse(tmp, &result_tmp, 10))
|
||||||
return result;
|
return result_tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
return std::nullopt;
|
return std::nullopt;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user