mirror of
https://github.com/izzy2lost/dolphin.git
synced 2026-06-19 01:16:48 -07:00
Merge pull request #8199 from lioncash/namespace
General: Use nested namespace specifiers where applicable
This commit is contained in:
@@ -6,9 +6,7 @@
|
||||
|
||||
#include "Common/Crypto/AES.h"
|
||||
|
||||
namespace Common
|
||||
{
|
||||
namespace AES
|
||||
namespace Common::AES
|
||||
{
|
||||
std::vector<u8> DecryptEncrypt(const u8* key, u8* iv, const u8* src, size_t size, Mode mode)
|
||||
{
|
||||
@@ -35,5 +33,4 @@ std::vector<u8> Encrypt(const u8* key, u8* iv, const u8* src, size_t size)
|
||||
{
|
||||
return DecryptEncrypt(key, iv, src, size, Mode::Encrypt);
|
||||
}
|
||||
} // namespace AES
|
||||
} // namespace Common
|
||||
} // namespace Common::AES
|
||||
|
||||
@@ -9,9 +9,7 @@
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
|
||||
namespace Common
|
||||
{
|
||||
namespace AES
|
||||
namespace Common::AES
|
||||
{
|
||||
enum class Mode
|
||||
{
|
||||
@@ -23,5 +21,4 @@ std::vector<u8> DecryptEncrypt(const u8* key, u8* iv, const u8* src, size_t size
|
||||
// Convenience functions
|
||||
std::vector<u8> Decrypt(const u8* key, u8* iv, const u8* src, size_t size);
|
||||
std::vector<u8> Encrypt(const u8* key, u8* iv, const u8* src, size_t size);
|
||||
} // namespace AES
|
||||
} // namespace Common
|
||||
} // namespace Common::AES
|
||||
|
||||
@@ -12,9 +12,7 @@
|
||||
#include "Core/DSP/DSPMemoryMap.h"
|
||||
#include "Core/DSP/DSPTables.h"
|
||||
|
||||
namespace DSP
|
||||
{
|
||||
namespace Analyzer
|
||||
namespace DSP::Analyzer
|
||||
{
|
||||
namespace
|
||||
{
|
||||
@@ -167,5 +165,4 @@ u8 GetCodeFlags(u16 address)
|
||||
return code_flags[address];
|
||||
}
|
||||
|
||||
} // namespace Analyzer
|
||||
} // namespace DSP
|
||||
} // namespace DSP::Analyzer
|
||||
|
||||
@@ -7,9 +7,7 @@
|
||||
#include "Common/CommonTypes.h"
|
||||
|
||||
// Basic code analysis.
|
||||
namespace DSP
|
||||
{
|
||||
namespace Analyzer
|
||||
namespace DSP::Analyzer
|
||||
{
|
||||
// Useful things to detect:
|
||||
// * Loop endpoints - so that we can avoid checking for loops every cycle.
|
||||
@@ -35,5 +33,4 @@ void Analyze();
|
||||
// Retrieves the flags set during analysis for code in memory.
|
||||
u8 GetCodeFlags(u16 address);
|
||||
|
||||
} // namespace Analyzer
|
||||
} // namespace DSP
|
||||
} // namespace DSP::Analyzer
|
||||
|
||||
@@ -13,9 +13,7 @@
|
||||
// core isn't used, for example in an asm/disasm tool, then most of these
|
||||
// can be stubbed out.
|
||||
|
||||
namespace DSP
|
||||
{
|
||||
namespace Host
|
||||
namespace DSP::Host
|
||||
{
|
||||
u8 ReadHostMemory(u32 addr);
|
||||
void WriteHostMemory(u8 value, u32 addr);
|
||||
@@ -25,5 +23,4 @@ bool IsWiiHost();
|
||||
void InterruptRequest();
|
||||
void CodeLoaded(const u8* ptr, int size);
|
||||
void UpdateDebugger();
|
||||
} // namespace Host
|
||||
} // namespace DSP
|
||||
} // namespace DSP::Host
|
||||
|
||||
@@ -12,9 +12,7 @@
|
||||
|
||||
// Arithmetic and accumulator control.
|
||||
|
||||
namespace DSP
|
||||
{
|
||||
namespace Interpreter
|
||||
namespace DSP::Interpreter
|
||||
{
|
||||
// CLR $acR
|
||||
// 1000 r001 xxxx xxxx
|
||||
@@ -1159,6 +1157,4 @@ void asrnr(const UDSPInstruction opc)
|
||||
dsp_set_long_acc(dreg, acc);
|
||||
Update_SR_Register64(dsp_get_long_acc(dreg));
|
||||
}
|
||||
|
||||
} // namespace Interpreter
|
||||
} // namespace DSP
|
||||
} // namespace DSP::Interpreter
|
||||
|
||||
@@ -11,9 +11,7 @@
|
||||
#include "Core/DSP/Interpreter/DSPIntUtil.h"
|
||||
#include "Core/DSP/Interpreter/DSPInterpreter.h"
|
||||
|
||||
namespace DSP
|
||||
{
|
||||
namespace Interpreter
|
||||
namespace DSP::Interpreter
|
||||
{
|
||||
// Generic call implementation
|
||||
// CALLcc addressA
|
||||
@@ -263,6 +261,4 @@ void bloopi(const UDSPInstruction opc)
|
||||
dsp_skip_inst();
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace Interpreter
|
||||
} // namespace DSP
|
||||
} // namespace DSP::Interpreter
|
||||
|
||||
@@ -9,9 +9,7 @@
|
||||
#include "Core/DSP/Interpreter/DSPIntCCUtil.h"
|
||||
#include "Core/DSP/DSPCore.h"
|
||||
|
||||
namespace DSP
|
||||
{
|
||||
namespace Interpreter
|
||||
namespace DSP::Interpreter
|
||||
{
|
||||
void Update_SR_Register64(s64 _Value, bool carry, bool overflow)
|
||||
{
|
||||
@@ -182,6 +180,4 @@ bool CheckCondition(u8 _Condition)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace Interpreter
|
||||
} // namespace DSP
|
||||
} // namespace DSP::Interpreter
|
||||
|
||||
@@ -10,9 +10,7 @@
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
|
||||
namespace DSP
|
||||
{
|
||||
namespace Interpreter
|
||||
namespace DSP::Interpreter
|
||||
{
|
||||
bool CheckCondition(u8 _Condition);
|
||||
|
||||
@@ -40,6 +38,4 @@ inline bool isOverS32(s64 acc)
|
||||
{
|
||||
return (acc != (s32)acc) ? true : false;
|
||||
}
|
||||
|
||||
} // namespace Interpreter
|
||||
} // namespace DSP
|
||||
} // namespace DSP::Interpreter
|
||||
|
||||
@@ -30,9 +30,7 @@ static void WriteToBackLog(int i, int idx, u16 value)
|
||||
writeBackLogIdx[i] = idx;
|
||||
}
|
||||
|
||||
namespace Interpreter
|
||||
{
|
||||
namespace Ext
|
||||
namespace Interpreter::Ext
|
||||
{
|
||||
static bool IsSameMemArea(u16 a, u16 b)
|
||||
{
|
||||
@@ -493,9 +491,7 @@ void ldaxnm(const UDSPInstruction opc)
|
||||
void nop(const UDSPInstruction opc)
|
||||
{
|
||||
}
|
||||
|
||||
} // namespace Ext
|
||||
} // namespace Interpreter
|
||||
} // namespace Interpreter::Ext
|
||||
|
||||
// The ext ops are calculated in parallel with the actual op. That means that
|
||||
// both the main op and the ext op see the same register state as input. The
|
||||
|
||||
@@ -11,11 +11,7 @@
|
||||
// Many opcode have the lower 0xFF (some only 0x7f) free - there, an opcode extension
|
||||
// can be stored.
|
||||
|
||||
namespace DSP
|
||||
{
|
||||
namespace Interpreter
|
||||
{
|
||||
namespace Ext
|
||||
namespace DSP::Interpreter::Ext
|
||||
{
|
||||
void l(UDSPInstruction opc);
|
||||
void ln(UDSPInstruction opc);
|
||||
@@ -42,7 +38,4 @@ void dr(UDSPInstruction opc);
|
||||
void ir(UDSPInstruction opc);
|
||||
void nr(UDSPInstruction opc);
|
||||
void nop(UDSPInstruction opc);
|
||||
|
||||
} // namespace Ext
|
||||
} // namespace Interpreter
|
||||
} // namespace DSP
|
||||
} // namespace DSP::Interpreter::Ext
|
||||
|
||||
@@ -8,9 +8,7 @@
|
||||
#include "Core/DSP/Interpreter/DSPIntUtil.h"
|
||||
#include "Core/DSP/Interpreter/DSPInterpreter.h"
|
||||
|
||||
namespace DSP
|
||||
{
|
||||
namespace Interpreter
|
||||
namespace DSP::Interpreter
|
||||
{
|
||||
// SRS @M, $(0x18+S)
|
||||
// 0010 1sss mmmm mmmm
|
||||
@@ -261,6 +259,4 @@ void ilrrn(const UDSPInstruction opc)
|
||||
dsp_conditional_extend_accum(dreg);
|
||||
g_dsp.r.ar[reg] = dsp_increase_addr_reg(reg, (s16)g_dsp.r.ix[reg]);
|
||||
}
|
||||
|
||||
} // namespace Interpreter
|
||||
} // namespace DSP
|
||||
} // namespace DSP::Interpreter
|
||||
|
||||
@@ -10,9 +10,7 @@
|
||||
#include "Core/DSP/Interpreter/DSPIntUtil.h"
|
||||
#include "Core/DSP/Interpreter/DSPInterpreter.h"
|
||||
|
||||
namespace DSP
|
||||
{
|
||||
namespace Interpreter
|
||||
namespace DSP::Interpreter
|
||||
{
|
||||
// MRR $D, $S
|
||||
// 0001 11dd ddds ssss
|
||||
@@ -159,6 +157,4 @@ void srbith(const UDSPInstruction opc)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace Interpreter
|
||||
} // namespace DSP
|
||||
} // namespace DSP::Interpreter
|
||||
|
||||
@@ -11,9 +11,7 @@
|
||||
#include "Core/DSP/Interpreter/DSPIntUtil.h"
|
||||
#include "Core/DSP/Interpreter/DSPInterpreter.h"
|
||||
|
||||
namespace DSP
|
||||
{
|
||||
namespace Interpreter
|
||||
namespace DSP::Interpreter
|
||||
{
|
||||
namespace
|
||||
{
|
||||
@@ -594,6 +592,4 @@ void msub(const UDSPInstruction opc)
|
||||
|
||||
dsp_set_long_prod(prod);
|
||||
}
|
||||
|
||||
} // namespace Interpreter
|
||||
} // namespace DSP
|
||||
} // namespace DSP::Interpreter
|
||||
|
||||
@@ -11,9 +11,7 @@
|
||||
#include "Core/DSP/DSPCore.h"
|
||||
#include "Core/DSP/DSPStacks.h"
|
||||
|
||||
namespace DSP
|
||||
{
|
||||
namespace Interpreter
|
||||
namespace DSP::Interpreter
|
||||
{
|
||||
// ---------------------------------------------------------------------------------------
|
||||
// --- SR
|
||||
@@ -379,5 +377,4 @@ inline s16 dsp_get_ax_h(int _reg)
|
||||
return (s16)g_dsp.r.ax[_reg].h;
|
||||
}
|
||||
|
||||
} // namespace Interpreter
|
||||
} // namespace DSP
|
||||
} // namespace DSP::Interpreter
|
||||
|
||||
@@ -14,9 +14,7 @@
|
||||
#include "Core/DSP/DSPTables.h"
|
||||
#include "Core/DSP/Interpreter/DSPIntTables.h"
|
||||
|
||||
namespace DSP
|
||||
{
|
||||
namespace Interpreter
|
||||
namespace DSP::Interpreter
|
||||
{
|
||||
namespace
|
||||
{
|
||||
@@ -237,6 +235,4 @@ void nop(const UDSPInstruction opc)
|
||||
|
||||
ERROR_LOG(DSPLLE, "LLE: Unrecognized opcode 0x%04x", opc);
|
||||
}
|
||||
|
||||
} // namespace Interpreter
|
||||
} // namespace DSP
|
||||
} // namespace DSP::Interpreter
|
||||
|
||||
@@ -6,9 +6,7 @@
|
||||
|
||||
#include "Core/DSP/DSPCommon.h"
|
||||
|
||||
namespace DSP
|
||||
{
|
||||
namespace Interpreter
|
||||
namespace DSP::Interpreter
|
||||
{
|
||||
void Step();
|
||||
|
||||
@@ -146,5 +144,4 @@ void xorc(UDSPInstruction opc);
|
||||
void xori(UDSPInstruction opc);
|
||||
void xorr(UDSPInstruction opc);
|
||||
|
||||
} // namespace Interpreter
|
||||
} // namespace DSP
|
||||
} // namespace DSP::Interpreter
|
||||
|
||||
@@ -12,9 +12,7 @@
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
namespace HLE
|
||||
{
|
||||
namespace SystemVABI
|
||||
namespace HLE::SystemVABI
|
||||
{
|
||||
// SFINAE
|
||||
template <typename T>
|
||||
@@ -172,5 +170,4 @@ private:
|
||||
double GetFPR(u32 fpr) const override;
|
||||
};
|
||||
|
||||
} // namespace SystemVABI
|
||||
} // namespace HLE
|
||||
} // namespace HLE::SystemVABI
|
||||
|
||||
@@ -11,9 +11,7 @@
|
||||
#include "Core/HW/DSPHLE/UCodes/UCodes.h"
|
||||
#include "Core/HW/SystemTimers.h"
|
||||
|
||||
namespace DSP
|
||||
{
|
||||
namespace HLE
|
||||
namespace DSP::HLE
|
||||
{
|
||||
DSPHLE::DSPHLE() = default;
|
||||
|
||||
@@ -216,5 +214,4 @@ u16 DSPHLE::DSP_ReadControlRegister()
|
||||
void DSPHLE::PauseAndLock(bool do_lock, bool unpause_on_unlock)
|
||||
{
|
||||
}
|
||||
} // namespace HLE
|
||||
} // namespace DSP
|
||||
} // namespace DSP::HLE
|
||||
|
||||
@@ -13,9 +13,7 @@
|
||||
|
||||
class PointerWrap;
|
||||
|
||||
namespace DSP
|
||||
{
|
||||
namespace HLE
|
||||
namespace DSP::HLE
|
||||
{
|
||||
class UCodeInterface;
|
||||
|
||||
@@ -73,5 +71,4 @@ private:
|
||||
bool m_halt;
|
||||
bool m_assert_interrupt;
|
||||
};
|
||||
} // namespace HLE
|
||||
} // namespace DSP
|
||||
} // namespace DSP::HLE
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user