diff options
| author | Sintendo <3380580+Sintendo@users.noreply.github.com> | 2026-06-14 11:22:02 +0200 |
|---|---|---|
| committer | Sintendo <3380580+Sintendo@users.noreply.github.com> | 2026-06-14 11:22:02 +0200 |
| commit | ec0c4b72ff3f20d7d4db3d8561cdc52e2a356af6 (patch) | |
| tree | 219461a1e31b0890ad7235098fb3021dcb5cc44e /Source/Core/Common | |
| parent | f96a7682d45d1815cf419ed7461faace998389d1 (diff) | |
Remove unused headers
Diffstat (limited to 'Source/Core/Common')
| -rw-r--r-- | Source/Core/Common/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | Source/Core/Common/Semaphore.h | 72 | ||||
| -rw-r--r-- | Source/Core/Common/StringLiteral.h | 20 |
3 files changed, 0 insertions, 94 deletions
diff --git a/Source/Core/Common/CMakeLists.txt b/Source/Core/Common/CMakeLists.txt index 894fd38128..c7459b0853 100644 --- a/Source/Core/Common/CMakeLists.txt +++ b/Source/Core/Common/CMakeLists.txt @@ -132,7 +132,6 @@ add_library(common ScopeGuard.h SDCardUtil.cpp SDCardUtil.h - Semaphore.h SettingsHandler.cpp SettingsHandler.h SFMLHelper.cpp @@ -142,7 +141,6 @@ add_library(common SocketContext.h SpanUtils.h SPSCQueue.h - StringLiteral.h StringUtil.cpp StringUtil.h SymbolDB.cpp diff --git a/Source/Core/Common/Semaphore.h b/Source/Core/Common/Semaphore.h deleted file mode 100644 index cc87550148..0000000000 --- a/Source/Core/Common/Semaphore.h +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright 2016 Dolphin Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later - -#pragma once - -#ifdef _WIN32 - -#include <Windows.h> - -namespace Common -{ -class Semaphore -{ -public: - Semaphore(int initial_count, int maximum_count) - { - m_handle = CreateSemaphoreA(nullptr, initial_count, maximum_count, nullptr); - } - - ~Semaphore() { CloseHandle(m_handle); } - void Wait() { WaitForSingleObject(m_handle, INFINITE); } - void Post() { ReleaseSemaphore(m_handle, 1, nullptr); } - -private: - HANDLE m_handle; -}; -} // namespace Common - -#elif defined(__APPLE__) - -#include <dispatch/dispatch.h> - -namespace Common -{ -class Semaphore -{ -public: - Semaphore(int initial_count, int maximum_count) - { - m_handle = dispatch_semaphore_create(0); - for (int i = 0; i < initial_count; i++) - dispatch_semaphore_signal(m_handle); - } - ~Semaphore() { dispatch_release(m_handle); } - void Wait() { dispatch_semaphore_wait(m_handle, DISPATCH_TIME_FOREVER); } - void Post() { dispatch_semaphore_signal(m_handle); } - -private: - dispatch_semaphore_t m_handle; -}; -} // namespace Common - -#else - -#include <semaphore.h> - -namespace Common -{ -class Semaphore -{ -public: - Semaphore(int initial_count, int maximum_count) { sem_init(&m_handle, 0, initial_count); } - ~Semaphore() { sem_destroy(&m_handle); } - void Wait() { sem_wait(&m_handle); } - void Post() { sem_post(&m_handle); } - -private: - sem_t m_handle; -}; -} // namespace Common - -#endif // _WIN32 diff --git a/Source/Core/Common/StringLiteral.h b/Source/Core/Common/StringLiteral.h deleted file mode 100644 index 6da9afd24d..0000000000 --- a/Source/Core/Common/StringLiteral.h +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2023 Dolphin Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later - -#pragma once - -#include <algorithm> - -namespace Common -{ -// A useful template for passing string literals as arguments to templates -// from: https://ctrpeach.io/posts/cpp20-string-literal-template-parameters/ -template <size_t N> -struct StringLiteral -{ - consteval StringLiteral(const char (&str)[N]) { std::copy_n(str, N, value); } - - char value[N]; -}; - -} // namespace Common |
