Merge pull request #13022 from tygyh/Remove-redundant-semicolons

Remove redundant semicolons
This commit is contained in:
Tilka 2024-08-21 01:52:16 +01:00 committed by GitHub
commit 7b8b733b11
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
48 changed files with 72 additions and 70 deletions

View File

@ -312,7 +312,7 @@ class BitFieldArrayConstRef
friend class BitFieldArrayConstIterator<position, bits, size, T, S>;
public:
constexpr T Value() const { return m_array->Value(m_index); };
constexpr T Value() const { return m_array->Value(m_index); }
constexpr operator T() const { return Value(); }
private:
@ -333,7 +333,7 @@ class BitFieldArrayRef
friend class BitFieldArrayIterator<position, bits, size, T, S>;
public:
constexpr T Value() const { return m_array->Value(m_index); };
constexpr T Value() const { return m_array->Value(m_index); }
constexpr operator T() const { return Value(); }
T operator=(const BitFieldArrayRef<position, bits, size, T, S>& value) const
{

View File

@ -261,4 +261,4 @@ int __cdecl EnableCompatPatches()
extern "C" {
__declspec(allocate(".CRT$XCZ")) decltype(&EnableCompatPatches)
enableCompatPatches = EnableCompatPatches;
};
}

View File

@ -14,7 +14,7 @@
namespace Core
{
class CPUThreadGuard;
};
}
namespace Common::Debug
{

View File

@ -78,7 +78,7 @@ public:
{
static LdrDllNotifier notifier;
return notifier;
};
}
void Install(LdrObserver* observer);
void Uninstall(LdrObserver* observer);

View File

@ -54,7 +54,7 @@ public:
private:
Profiler* m_p;
};
}; // namespace Common
} // namespace Common
// Warning: This profiler isn't thread safe. Only profile functions which doesn't run simultaneously
#define PROFILE(name) \

View File

@ -195,7 +195,7 @@ std::from_chars_result FromChars(std::string_view sv, T& value,
const char* const last = first + sv.size();
return std::from_chars(first, last, value, fmt);
}
}; // namespace Common
} // namespace Common
std::string TabsToSpaces(int tab_size, std::string str);

View File

@ -69,4 +69,4 @@ OSVERSIONINFOW GetOSVersion()
}
return info;
}
}; // namespace WindowsRegistry
} // namespace WindowsRegistry

View File

@ -15,4 +15,4 @@ template <>
bool ReadValue(std::string* value, const std::string& subkey, const std::string& name);
OSVERSIONINFOW GetOSVersion();
}; // namespace WindowsRegistry
} // namespace WindowsRegistry

View File

@ -170,7 +170,7 @@ private:
void FetchBoardInfo(AchievementId leaderboard_id);
std::unique_ptr<DiscIO::Volume>& GetLoadingVolume() { return m_loading_volume; };
std::unique_ptr<DiscIO::Volume>& GetLoadingVolume() { return m_loading_volume; }
static void LoadGameCallback(int result, const char* error_message, rc_client_t* client,
void* userdata);

View File

@ -18,7 +18,7 @@ class IniFile;
namespace Core
{
class CPUThreadGuard;
};
}
namespace ActionReplay
{

View File

@ -24,7 +24,7 @@ public:
bool IsValid() const override { return m_is_valid; }
bool IsWii() const override { return m_is_wii; }
bool IsAncast() const { return m_is_ancast; };
bool IsAncast() const { return m_is_ancast; }
u32 GetEntryPoint() const override { return m_dolheader.entryPoint; }
bool LoadIntoMemory(Core::System& system, bool only_in_mem1 = false) const override;
bool LoadSymbols(const Core::CPUThreadGuard& guard, PPCSymbolDB& ppc_symbol_db) const override

View File

@ -38,7 +38,7 @@ void OnConfigChanged()
}
}
}; // namespace
} // namespace
namespace CPUThreadConfigCallback
{
@ -73,4 +73,4 @@ void CheckForConfigChanges()
RunCallbacks();
}
}; // namespace CPUThreadConfigCallback
} // namespace CPUThreadConfigCallback

View File

@ -27,4 +27,4 @@ void RemoveConfigChangedCallback(ConfigChangedCallbackID callback_id);
// Should be called regularly from the CPU thread
void CheckForConfigChanges();
}; // namespace CPUThreadConfigCallback
} // namespace CPUThreadConfigCallback

View File

@ -17,7 +17,7 @@
namespace Core
{
class CPUThreadGuard;
};
}
namespace Cheats
{

View File

@ -142,7 +142,7 @@ public:
m_collection_pf.size();
}
std::size_t GetBlacklistSize() const { return m_blacklist_size; }
Phase GetRecordingPhase() const { return m_recording_phase; };
Phase GetRecordingPhase() const { return m_recording_phase; }
// An empty selection in reduction mode can't be reconstructed when loading from a file.
bool CanSave() const { return !(m_recording_phase == Phase::Reduction && m_selection.empty()); }

View File

@ -13,7 +13,7 @@
namespace Core
{
class CPUThreadGuard;
};
}
namespace Core::Debug
{

View File

@ -16,7 +16,7 @@ class PPCSymbolDB;
namespace Core
{
class CPUThreadGuard;
};
}
struct RSOEntry
{

View File

@ -14,7 +14,7 @@ class PointerWrap;
namespace Core
{
class CPUThreadGuard;
};
}
namespace Gecko
{

View File

@ -6,7 +6,7 @@
namespace Core
{
class CPUThreadGuard;
};
}
namespace HLE_Misc
{

View File

@ -11,7 +11,7 @@
namespace Core
{
class CPUThreadGuard;
};
}
namespace HLE_OS
{

View File

@ -120,7 +120,7 @@ struct EffectiveAddressSpaceAccessors : Accessors
float ReadF32(const Core::CPUThreadGuard& guard, u32 address) const override
{
return PowerPC::MMU::HostRead_F32(guard, address);
};
}
bool Matches(const Core::CPUThreadGuard& guard, u32 haystack_start, const u8* needle_start,
std::size_t needle_size) const

View File

@ -42,7 +42,7 @@ distribution.
namespace ExpansionInterface
{
enum class Slot : int;
};
}
using CardFlashId = std::array<u8, 12>;

View File

@ -72,7 +72,7 @@ public:
using TriggerRawValue = ControllerEmu::RawValue<TriggerType, TRIGGER_BITS>;
// 6-bit X and Y values (0-63)
auto GetLeftStick() const { return LeftStickRawValue{StickType(lx, ly)}; };
auto GetLeftStick() const { return LeftStickRawValue{StickType(lx, ly)}; }
void SetLeftStick(const StickType& value)
{
lx = value.x;
@ -82,7 +82,7 @@ public:
auto GetRightStick() const
{
return RightStickRawValue{StickType(rx1 | rx2 << 1 | rx3 << 3, ry)};
};
}
void SetRightStick(const StickType& value)
{
rx1 = value.x & 0b1;

View File

@ -30,7 +30,7 @@ struct MPI : mbedtls_mpi
MPI() { mbedtls_mpi_init(this); }
~MPI() { mbedtls_mpi_free(this); }
mbedtls_mpi* Data() { return this; };
mbedtls_mpi* Data() { return this; }
template <std::size_t N>
bool ReadBinary(const u8 (&in_data)[N])

View File

@ -890,7 +890,7 @@ bool BluetoothEmuDevice::SendEventLinkKeyNotification(const u8 num_to_send)
AddEventToQueue(event);
return true;
};
}
bool BluetoothEmuDevice::SendEventRequestLinkKey(const bdaddr_t& bd)
{
@ -911,7 +911,7 @@ bool BluetoothEmuDevice::SendEventRequestLinkKey(const bdaddr_t& bd)
AddEventToQueue(event);
return true;
};
}
bool BluetoothEmuDevice::SendEventReadClockOffsetComplete(u16 connection_handle)
{

View File

@ -25,7 +25,7 @@ public:
const std::vector<std::pair<u8*, u8*>>& GetRangesToFree() const
{
return m_ranges_to_free_on_next_codegen;
};
}
private:
void WriteLinkBlock(const JitBlock::LinkData& source, const JitBlock* dest) override;

View File

@ -49,8 +49,8 @@ public:
const u8* GetCodePtr() const { return m_code; }
u8* GetWritableCodePtr() { return m_code; }
const u8* GetCodeEnd() const { return m_code_end; };
u8* GetWritableCodeEnd() { return m_code_end; };
const u8* GetCodeEnd() const { return m_code_end; }
u8* GetWritableCodeEnd() { return m_code_end; }
// Should be checked after a block of code has been generated to see if the code has been
// successfully written to memory. Do not call the generated code when this returns true!
bool HasWriteFailed() const { return m_write_failed; }
@ -60,7 +60,7 @@ public:
m_code = begin;
m_code_end = end;
m_write_failed = false;
};
}
static s32 PoisonCallback(PowerPC::PowerPCState& ppc_state, const void* operands);

View File

@ -15,11 +15,11 @@ namespace Core
{
class CPUThreadGuard;
class System;
}; // namespace Core
} // namespace Core
namespace Memory
{
class MemoryManager;
};
}
namespace PowerPC
{

View File

@ -17,7 +17,7 @@ class XFStateManager;
namespace AudioInterface
{
class AudioInterfaceManager;
};
}
namespace CPU
{
class CPUManager;
@ -42,7 +42,7 @@ class DVDThread;
namespace ExpansionInterface
{
class ExpansionInterfaceManager;
};
}
namespace Fifo
{
class FifoManager;
@ -69,15 +69,15 @@ namespace IOS::HLE::USB
{
class SkylanderPortal;
class InfinityBase;
}; // namespace IOS::HLE::USB
} // namespace IOS::HLE::USB
namespace Memory
{
class MemoryManager;
};
}
namespace MemoryInterface
{
class MemoryInterfaceManager;
};
}
namespace Movie
{
class MovieManager;
@ -85,7 +85,7 @@ class MovieManager;
namespace PixelEngine
{
class PixelEngineManager;
};
}
namespace PowerPC
{
class MMU;
@ -100,7 +100,7 @@ class ProcessorInterfaceManager;
namespace SerialInterface
{
class SerialInterfaceManager;
};
}
namespace SystemTimers
{
class SystemTimersManager;
@ -112,7 +112,7 @@ class CustomAssetLoader;
namespace VideoInterface
{
class VideoInterfaceManager;
};
}
namespace Core
{

View File

@ -272,7 +272,7 @@ static ConversionResultCode Output(OutputParameters parameters, File::IOFile* ou
}
return ConversionResultCode::Success;
};
}
bool ConvertToGCZ(BlobReader* infile, const std::string& infile_path,
const std::string& outfile_path, u32 sub_type, int block_size,

View File

@ -67,7 +67,7 @@ static std::vector<u8> ReadHexString(std::string_view sv)
sv = sv.substr(2);
}
return result;
};
}
std::optional<Disc> ParseString(std::string_view xml, std::string xml_path)
{

View File

@ -1120,27 +1120,27 @@ bool WIARVZFileReader<RVZ>::TryReuse(std::map<ReuseID, GroupEntry>* reusable_gro
static bool AllAre(const std::vector<u8>& data, u8 x)
{
return std::all_of(data.begin(), data.end(), [x](u8 y) { return x == y; });
};
}
static bool AllAre(const u8* begin, const u8* end, u8 x)
{
return std::all_of(begin, end, [x](u8 y) { return x == y; });
};
}
static bool AllZero(const std::vector<u8>& data)
{
return AllAre(data, 0);
};
}
static bool AllSame(const std::vector<u8>& data)
{
return AllAre(data, data.front());
};
}
static bool AllSame(const u8* begin, const u8* end)
{
return AllAre(begin, end, *begin);
};
}
template <typename OutputParametersEntry>
static void RVZPack(const u8* in, OutputParametersEntry* out, u64 bytes_per_chunk, size_t chunks,

View File

@ -38,7 +38,7 @@ public:
virtual bool Decompress(const DecompressionBuffer& in, DecompressionBuffer* out,
size_t* in_bytes_read) = 0;
virtual bool Done() const { return m_done; };
virtual bool Done() const { return m_done; }
protected:
bool m_done = false;

View File

@ -18,7 +18,7 @@ namespace Core
{
class CPUThreadGuard;
class System;
}; // namespace Core
} // namespace Core
class WatchWidget : public QDockWidget
{

View File

@ -65,7 +65,7 @@ Slot OtherSlot(Slot slot)
{
return slot == Slot::A ? Slot::B : Slot::A;
}
}; // namespace
} // namespace
struct GCMemcardManager::IconAnimationData
{

View File

@ -50,7 +50,7 @@ InfinityBaseWindow::InfinityBaseWindow(QWidget* parent) : QWidget(parent)
installEventFilter(this);
OnEmulationStateChanged(Core::GetState(Core::System::GetInstance()));
};
}
InfinityBaseWindow::~InfinityBaseWindow() = default;

View File

@ -24,7 +24,7 @@ enum class State;
namespace DiscIO
{
enum class Region;
};
}
namespace UICommon
{

View File

@ -81,7 +81,7 @@ SkylanderPortalWindow::SkylanderPortalWindow(QWidget* parent) : QWidget(parent)
m_collection_path = QDir::toNativeSeparators(skylanders_folder.path()) + QDir::separator();
m_last_skylander_path = m_collection_path;
m_path_edit->setText(m_collection_path);
};
}
SkylanderPortalWindow::~SkylanderPortalWindow() = default;

View File

@ -283,7 +283,7 @@ public:
m_output = env.FindOutput(m_qualifier);
}
Device::Input* GetInput() const { return m_input; };
Device::Input* GetInput() const { return m_input; }
private:
// Keep a shared_ptr to the device so the control pointer doesn't become invalid.

View File

@ -87,7 +87,7 @@ public:
ControlState GetDeadzonePercentage() const;
virtual ControlState GetVirtualNotchSize() const { return 0.0; };
virtual ControlState GetVirtualNotchSize() const { return 0.0; }
virtual ControlState GetGateRadiusAtAngle(double angle) const = 0;
virtual ReshapeData GetReshapableState(bool adjusted) const = 0;

View File

@ -244,10 +244,12 @@ private:
public:
MotionInput(std::string name, SDL_GameController* gc, SDL_SensorType type, int index,
ControlState scale)
: m_name(std::move(name)), m_gc(gc), m_type(type), m_index(index), m_scale(scale){};
: m_name(std::move(name)), m_gc(gc), m_type(type), m_index(index), m_scale(scale)
{
}
std::string GetName() const override { return m_name; };
bool IsDetectable() const override { return false; };
std::string GetName() const override { return m_name; }
bool IsDetectable() const override { return false; }
ControlState GetState() const override;
private:

View File

@ -99,4 +99,4 @@ void D3DBoundingBox::Write(u32 index, std::span<const BBoxType> values)
D3D::context->UpdateSubresource(m_buffer.Get(), 0, &box, values.data(), 0, 0);
}
}; // namespace DX11
} // namespace DX11

View File

@ -125,4 +125,4 @@ bool D3D12BoundingBox::CreateBuffers()
return true;
}
}; // namespace DX12
} // namespace DX12

View File

@ -442,4 +442,4 @@ void SetInterlacingMode(const BPCmd& bp)
break;
}
}
}; // namespace BPFunctions
} // namespace BPFunctions

View File

@ -30,14 +30,14 @@ constexpr u32 CYAN = 0xFF00FFFF;
constexpr u32 GREEN = 0xFF00FF00;
constexpr u32 RED = 0xFFFF0000;
constexpr u32 YELLOW = 0xFFFFFF30;
}; // namespace Color
} // namespace Color
namespace Duration
{
constexpr u32 SHORT = 2000;
constexpr u32 NORMAL = 5000;
constexpr u32 VERY_LONG = 10000;
}; // namespace Duration
} // namespace Duration
// On-screen message display (colored yellow by default)
void AddMessage(std::string message, u32 ms = Duration::SHORT, u32 argb = Color::YELLOW,

View File

@ -18,7 +18,7 @@ struct PortableVertexDeclaration;
namespace OpcodeDecoder
{
enum class Primitive : u8;
};
}
namespace VertexLoaderManager
{

View File

@ -45,7 +45,7 @@ enum TexelBufferFormat : u32
namespace OpcodeDecoder
{
enum class Primitive : u8;
};
}
class VertexManagerBase
{

View File

@ -47,7 +47,7 @@ LRESULT CALLBACK WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
}
return DefWindowProc(hwnd, uMsg, wParam, lParam);
}
}; // namespace
} // namespace
constexpr int PROGRESSBAR_FLAGS = WS_VISIBLE | WS_CHILD | PBS_SMOOTH | PBS_SMOOTHREVERSE;
constexpr int WINDOW_FLAGS = WS_CLIPCHILDREN;
@ -305,4 +305,4 @@ void SetVisible(bool visible)
ShowWindow(window_handle, visible ? SW_SHOW : SW_HIDE);
}
}; // namespace UI
} // namespace UI