Manually tweak source formatting and then re-run clang-format
This commit is contained in:
parent
784b96d87f
commit
396a8d91a4
169 changed files with 805 additions and 809 deletions
|
@ -102,10 +102,8 @@ public:
|
|||
// A reference to a particular bit, returned from operator[].
|
||||
class Ref {
|
||||
public:
|
||||
Ref(Ref&& other) : m_bs(other.m_bs), m_mask(other.m_mask) {
|
||||
}
|
||||
Ref(BitSet* bs, IntTy mask) : m_bs(bs), m_mask(mask) {
|
||||
}
|
||||
Ref(Ref&& other) : m_bs(other.m_bs), m_mask(other.m_mask) {}
|
||||
Ref(BitSet* bs, IntTy mask) : m_bs(bs), m_mask(mask) {}
|
||||
operator bool() const {
|
||||
return (m_bs->m_val & m_mask) != 0;
|
||||
}
|
||||
|
@ -122,10 +120,8 @@ public:
|
|||
// A STL-like iterator is required to be able to use range-based for loops.
|
||||
class Iterator {
|
||||
public:
|
||||
Iterator(const Iterator& other) : m_val(other.m_val), m_bit(other.m_bit) {
|
||||
}
|
||||
Iterator(IntTy val, int bit) : m_val(val), m_bit(bit) {
|
||||
}
|
||||
Iterator(const Iterator& other) : m_val(other.m_val), m_bit(other.m_bit) {}
|
||||
Iterator(IntTy val, int bit) : m_val(val), m_bit(bit) {}
|
||||
Iterator& operator=(Iterator other) {
|
||||
new (this) Iterator(other);
|
||||
return *this;
|
||||
|
@ -160,10 +156,8 @@ public:
|
|||
int m_bit;
|
||||
};
|
||||
|
||||
BitSet() : m_val(0) {
|
||||
}
|
||||
explicit BitSet(IntTy val) : m_val(val) {
|
||||
}
|
||||
BitSet() : m_val(0) {}
|
||||
explicit BitSet(IntTy val) : m_val(val) {}
|
||||
BitSet(std::initializer_list<int> init) {
|
||||
m_val = 0;
|
||||
for (int bit : init)
|
||||
|
|
|
@ -50,8 +50,7 @@ class PointerWrap;
|
|||
class PointerWrapSection {
|
||||
public:
|
||||
PointerWrapSection(PointerWrap& p, int ver, const char* title)
|
||||
: p_(p), ver_(ver), title_(title) {
|
||||
}
|
||||
: p_(p), ver_(ver), title_(title) {}
|
||||
~PointerWrapSection();
|
||||
|
||||
bool operator==(const int& v) const {
|
||||
|
@ -134,11 +133,9 @@ public:
|
|||
Error error;
|
||||
|
||||
public:
|
||||
PointerWrap(u8** ptr_, Mode mode_) : ptr(ptr_), mode(mode_), error(ERROR_NONE) {
|
||||
}
|
||||
PointerWrap(u8** ptr_, Mode mode_) : ptr(ptr_), mode(mode_), error(ERROR_NONE) {}
|
||||
PointerWrap(unsigned char** ptr_, int mode_)
|
||||
: ptr((u8**)ptr_), mode((Mode)mode_), error(ERROR_NONE) {
|
||||
}
|
||||
: ptr((u8**)ptr_), mode((Mode)mode_), error(ERROR_NONE) {}
|
||||
|
||||
PointerWrapSection Section(const char* title, int ver) {
|
||||
return Section(title, ver, ver);
|
||||
|
|
|
@ -27,8 +27,7 @@ protected:
|
|||
size_t region_size;
|
||||
|
||||
public:
|
||||
CodeBlock() : region(nullptr), region_size(0) {
|
||||
}
|
||||
CodeBlock() : region(nullptr), region_size(0) {}
|
||||
virtual ~CodeBlock() {
|
||||
if (region)
|
||||
FreeCodeSpace();
|
||||
|
|
|
@ -86,8 +86,7 @@ inline u64 _rotr64(u64 x, unsigned int shift) {
|
|||
extern "C" {
|
||||
__declspec(dllimport) void __stdcall DebugBreak(void);
|
||||
}
|
||||
#define Crash() \
|
||||
{ DebugBreak(); }
|
||||
#define Crash() DebugBreak()
|
||||
|
||||
// cstdlib provides these on MSVC
|
||||
#define rotr _rotr
|
||||
|
|
|
@ -229,8 +229,7 @@ protected:
|
|||
circle_pad_y = 0;
|
||||
touch_pressed = false;
|
||||
}
|
||||
virtual ~EmuWindow() {
|
||||
}
|
||||
virtual ~EmuWindow() {}
|
||||
|
||||
/**
|
||||
* Processes any pending configuration changes from the last SetConfig call.
|
||||
|
@ -272,8 +271,8 @@ private:
|
|||
* For the request to be honored, EmuWindow implementations will usually reimplement this
|
||||
* function.
|
||||
*/
|
||||
virtual void
|
||||
OnMinimalClientAreaChangeRequest(const std::pair<unsigned, unsigned>& minimal_size) {
|
||||
virtual void OnMinimalClientAreaChangeRequest(
|
||||
const std::pair<unsigned, unsigned>& minimal_size) {
|
||||
// By default, ignore this request and do nothing.
|
||||
}
|
||||
|
||||
|
|
|
@ -828,8 +828,7 @@ void SplitFilename83(const std::string& filename, std::array<char, 9>& short_nam
|
|||
}
|
||||
}
|
||||
|
||||
IOFile::IOFile() {
|
||||
}
|
||||
IOFile::IOFile() {}
|
||||
|
||||
IOFile::IOFile(const std::string& filename, const char openmode[]) {
|
||||
Open(filename, openmode);
|
||||
|
|
|
@ -27,12 +27,10 @@ struct Rectangle {
|
|||
T right;
|
||||
T bottom;
|
||||
|
||||
Rectangle() {
|
||||
}
|
||||
Rectangle() {}
|
||||
|
||||
Rectangle(T left, T top, T right, T bottom)
|
||||
: left(left), top(top), right(right), bottom(bottom) {
|
||||
}
|
||||
: left(left), top(top), right(right), bottom(bottom) {}
|
||||
|
||||
T GetWidth() const {
|
||||
return std::abs(static_cast<typename std::make_signed<T>::type>(right - left));
|
||||
|
|
|
@ -14,8 +14,7 @@ namespace Common {
|
|||
namespace Profiling {
|
||||
|
||||
ProfilingManager::ProfilingManager()
|
||||
: last_frame_end(Clock::now()), this_frame_start(Clock::now()) {
|
||||
}
|
||||
: last_frame_end(Clock::now()), this_frame_start(Clock::now()) {}
|
||||
|
||||
void ProfilingManager::BeginFrame() {
|
||||
this_frame_start = Clock::now();
|
||||
|
|
|
@ -10,8 +10,7 @@
|
|||
namespace detail {
|
||||
template <typename Func>
|
||||
struct ScopeExitHelper {
|
||||
explicit ScopeExitHelper(Func&& func) : func(std::move(func)) {
|
||||
}
|
||||
explicit ScopeExitHelper(Func&& func) : func(std::move(func)) {}
|
||||
~ScopeExitHelper() {
|
||||
func();
|
||||
}
|
||||
|
|
|
@ -168,8 +168,7 @@ public:
|
|||
return swap(value);
|
||||
}
|
||||
swap_struct_t() = default;
|
||||
swap_struct_t(const T& v) : value(swap(v)) {
|
||||
}
|
||||
swap_struct_t(const T& v) : value(swap(v)) {}
|
||||
|
||||
template <typename S>
|
||||
swapped_t& operator=(const S& source) {
|
||||
|
|
|
@ -19,8 +19,7 @@ template <typename T>
|
|||
class SynchronizedWrapper {
|
||||
public:
|
||||
template <typename... Args>
|
||||
SynchronizedWrapper(Args&&... args) : data(std::forward<Args>(args)...) {
|
||||
}
|
||||
SynchronizedWrapper(Args&&... args) : data(std::forward<Args>(args)...) {}
|
||||
|
||||
private:
|
||||
template <typename U>
|
||||
|
|
|
@ -39,8 +39,7 @@ void SetCurrentThreadAffinity(u32 mask);
|
|||
|
||||
class Event {
|
||||
public:
|
||||
Event() : is_set(false) {
|
||||
}
|
||||
Event() : is_set(false) {}
|
||||
|
||||
void Set() {
|
||||
std::lock_guard<std::mutex> lk(mutex);
|
||||
|
@ -71,8 +70,7 @@ private:
|
|||
|
||||
class Barrier {
|
||||
public:
|
||||
explicit Barrier(size_t count_) : count(count_), waiting(0), generation(0) {
|
||||
}
|
||||
explicit Barrier(size_t count_) : count(count_), waiting(0), generation(0) {}
|
||||
|
||||
/// Blocks until all "count" threads have called Sync()
|
||||
void Sync() {
|
||||
|
|
|
@ -60,10 +60,8 @@ public:
|
|||
}
|
||||
|
||||
Vec2() = default;
|
||||
Vec2(const T a[2]) : x(a[0]), y(a[1]) {
|
||||
}
|
||||
Vec2(const T& _x, const T& _y) : x(_x), y(_y) {
|
||||
}
|
||||
Vec2(const T a[2]) : x(a[0]), y(a[1]) {}
|
||||
Vec2(const T& _x, const T& _y) : x(_x), y(_y) {}
|
||||
|
||||
template <typename T2>
|
||||
Vec2<T2> Cast() const {
|
||||
|
@ -201,10 +199,8 @@ public:
|
|||
}
|
||||
|
||||
Vec3() = default;
|
||||
Vec3(const T a[3]) : x(a[0]), y(a[1]), z(a[2]) {
|
||||
}
|
||||
Vec3(const T& _x, const T& _y, const T& _z) : x(_x), y(_y), z(_z) {
|
||||
}
|
||||
Vec3(const T a[3]) : x(a[0]), y(a[1]), z(a[2]) {}
|
||||
Vec3(const T& _x, const T& _y, const T& _z) : x(_x), y(_y), z(_z) {}
|
||||
|
||||
template <typename T2>
|
||||
Vec3<T2> Cast() const {
|
||||
|
@ -409,10 +405,8 @@ public:
|
|||
}
|
||||
|
||||
Vec4() = default;
|
||||
Vec4(const T a[4]) : x(a[0]), y(a[1]), z(a[2]), w(a[3]) {
|
||||
}
|
||||
Vec4(const T& _x, const T& _y, const T& _z, const T& _w) : x(_x), y(_y), z(_z), w(_w) {
|
||||
}
|
||||
Vec4(const T a[4]) : x(a[0]), y(a[1]), z(a[2]), w(a[3]) {}
|
||||
Vec4(const T& _x, const T& _y, const T& _z, const T& _w) : x(_x), y(_y), z(_z), w(_w) {}
|
||||
|
||||
template <typename T2>
|
||||
Vec4<T2> Cast() const {
|
||||
|
|
|
@ -222,7 +222,7 @@ void OpArg::WriteVex(XEmitter* emit, X64Reg regOp1, X64Reg regOp2, int L, int pp
|
|||
void OpArg::WriteRest(XEmitter* emit, int extraBytes, X64Reg _operandReg,
|
||||
bool warn_64bit_offset) const {
|
||||
if (_operandReg == INVALID_REG)
|
||||
_operandReg = (X64Reg) this->operandReg;
|
||||
_operandReg = (X64Reg)this->operandReg;
|
||||
int mod = 0;
|
||||
int ireg = indexReg;
|
||||
bool SIB = false;
|
||||
|
|
|
@ -233,8 +233,7 @@ struct OpArg {
|
|||
constexpr OpArg() = default; // dummy op arg, used for storage
|
||||
constexpr OpArg(u64 offset_, int scale_, X64Reg rmReg = RAX, X64Reg scaledReg = RAX)
|
||||
: scale(static_cast<u8>(scale_)), offsetOrBaseReg(static_cast<u16>(rmReg)),
|
||||
indexReg(static_cast<u16>(scaledReg)), offset(offset_) {
|
||||
}
|
||||
indexReg(static_cast<u16>(scaledReg)), offset(offset_) {}
|
||||
|
||||
constexpr bool operator==(const OpArg& b) const {
|
||||
return operandReg == b.operandReg && scale == b.scale &&
|
||||
|
@ -454,8 +453,7 @@ public:
|
|||
code = code_ptr;
|
||||
flags_locked = false;
|
||||
}
|
||||
virtual ~XEmitter() {
|
||||
}
|
||||
virtual ~XEmitter() {}
|
||||
|
||||
void WriteModRM(int mod, int rm, int reg);
|
||||
void WriteSIB(int scale, int index, int base);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue