aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/common/CMakeLists.txt1
-rw-r--r--src/common/common.h6
-rw-r--r--src/common/console_listener.cpp6
-rw-r--r--src/common/file_search.cpp4
-rw-r--r--src/common/file_util.cpp7
-rw-r--r--src/common/fixed_size_queue.h70
-rw-r--r--src/common/log_manager.cpp1
-rw-r--r--src/common/math_util.cpp3
-rw-r--r--src/common/mem_arena.cpp4
-rw-r--r--src/common/memory_util.cpp3
-rw-r--r--src/common/string_util.cpp15
-rw-r--r--src/common/thread.cpp1
-rw-r--r--src/common/utf8.cpp4
-rw-r--r--src/core/arm/disassembler/load_symbol_map.cpp1
-rw-r--r--src/core/core.cpp6
-rw-r--r--src/core/hle/config_mem.cpp1
-rw-r--r--src/core/hle/coprocessor.cpp1
-rw-r--r--src/core/hle/hle.cpp1
-rw-r--r--src/core/hle/kernel/archive.cpp1
-rw-r--r--src/core/hle/kernel/kernel.cpp2
-rw-r--r--src/core/hle/kernel/thread.cpp3
-rw-r--r--src/core/hle/service/fs.cpp2
-rw-r--r--src/core/hle/service/gsp.cpp1
-rw-r--r--src/core/hle/service/ndm.cpp2
-rw-r--r--src/core/hle/service/service.cpp5
-rw-r--r--src/core/hle/service/srv.cpp1
-rw-r--r--src/core/hle/svc.cpp3
-rw-r--r--src/core/hw/gpu.cpp2
-rw-r--r--src/core/hw/hw.cpp1
-rw-r--r--src/core/hw/ndma.cpp1
-rw-r--r--src/core/loader/loader.cpp1
-rw-r--r--src/core/mem_map.cpp1
-rw-r--r--src/core/mem_map_funcs.cpp1
33 files changed, 11 insertions, 151 deletions
diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt
index 868fda55..3a82f5b8 100644
--- a/src/common/CMakeLists.txt
+++ b/src/common/CMakeLists.txt
@@ -38,7 +38,6 @@ set(HEADERS
fifo_queue.h
file_search.h
file_util.h
- fixed_size_queue.h
hash.h
linear_disk_cache.h
log.h
diff --git a/src/common/common.h b/src/common/common.h
index cb69eabe..9f3016d3 100644
--- a/src/common/common.h
+++ b/src/common/common.h
@@ -20,11 +20,6 @@
#define STACKALIGN
-#if __cplusplus >= 201103L || defined(_MSC_VER) || defined(__GXX_EXPERIMENTAL_CXX0X__)
-#define HAVE_CXX11_SYNTAX 1
-#endif
-
-#if HAVE_CXX11_SYNTAX
// An inheritable class to disallow the copy constructor and operator= functions
class NonCopyable
{
@@ -36,7 +31,6 @@ private:
NonCopyable(NonCopyable&);
NonCopyable& operator=(NonCopyable& other);
};
-#endif
#include "common/log.h"
#include "common/common_types.h"
diff --git a/src/common/console_listener.cpp b/src/common/console_listener.cpp
index 96970ab1..40122224 100644
--- a/src/common/console_listener.cpp
+++ b/src/common/console_listener.cpp
@@ -3,14 +3,10 @@
// Refer to the license.txt file included.
#include <algorithm>
-#include <cmath>
-#include <cstdio>
-#include <string>
+
#ifdef _WIN32
#include <windows.h>
#include <array>
-#else
-#include <cstdarg>
#endif
#include "common/common.h"
diff --git a/src/common/file_search.cpp b/src/common/file_search.cpp
index a80a9882..63580f68 100644
--- a/src/common/file_search.cpp
+++ b/src/common/file_search.cpp
@@ -4,15 +4,13 @@
#include "common/common.h"
-#include "common/common_paths.h"
+
#ifndef _WIN32
-#include <sys/types.h>
#include <dirent.h>
#else
#include <windows.h>
#endif
-#include <string>
#include <algorithm>
#include "common/file_search.h"
diff --git a/src/common/file_util.cpp b/src/common/file_util.cpp
index 2fdc7ec0..97004100 100644
--- a/src/common/file_util.cpp
+++ b/src/common/file_util.cpp
@@ -4,9 +4,7 @@
#include "common/common.h"
-#include "common/common_paths.h"
#include "common/file_util.h"
-#include "common/string_util.h"
#ifdef _WIN32
#include <windows.h>
@@ -16,10 +14,7 @@
#include <io.h>
#include <direct.h> // getcwd
#else
-#include <cerrno>
-#include <cstdlib>
#include <sys/param.h>
-#include <sys/types.h>
#include <dirent.h>
#endif
@@ -32,8 +27,6 @@
#include <algorithm>
#include <sys/stat.h>
-#include "common/string_util.h"
-
#ifndef S_ISDIR
#define S_ISDIR(m) (((m)&S_IFMT) == S_IFDIR)
#endif
diff --git a/src/common/fixed_size_queue.h b/src/common/fixed_size_queue.h
deleted file mode 100644
index 1e3a5dea..00000000
--- a/src/common/fixed_size_queue.h
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright 2013 Dolphin Emulator Project
-// Licensed under GPLv2
-// Refer to the license.txt file included.
-
-#pragma once
-
-// STL-look-a-like interface, but name is mixed case to distinguish it clearly from the
-// real STL classes.
-
-// Not fully featured, no safety checking yet. Add features as needed.
-
-// TODO: "inline" storage?
-
-template <class T, int N>
-class fixed_size_queue.h
-{
- T *storage;
- int head;
- int tail;
- int count; // sacrifice 4 bytes for a simpler implementation. may optimize away in the future.
-
- // Make copy constructor private for now.
- fixed_size_queue.h(fixed_size_queue.h &other) { }
-
-public:
- fixed_size_queue.h()
- {
- storage = new T[N];
- clear();
- }
-
- ~fixed_size_queue.h()
- {
- delete [] storage;
- }
-
- void clear() {
- head = 0;
- tail = 0;
- count = 0;
- }
-
- void push(T t) {
- storage[tail] = t;
- tail++;
- if (tail == N)
- tail = 0;
- count++;
- }
-
- void pop() {
- head++;
- if (head == N)
- head = 0;
- count--;
- }
-
- T pop_front() {
- const T &temp = storage[head];
- pop();
- return temp;
- }
-
- T &front() { return storage[head]; }
- const T &front() const { return storage[head]; }
-
- size_t size() const {
- return count;
- }
-};
diff --git a/src/common/log_manager.cpp b/src/common/log_manager.cpp
index 9fd019fb..43346f27 100644
--- a/src/common/log_manager.cpp
+++ b/src/common/log_manager.cpp
@@ -8,7 +8,6 @@
#include "common/console_listener.h"
#include "common/timer.h"
#include "common/thread.h"
-#include "common/file_util.h"
void GenericLog(LogTypes::LOG_LEVELS level, LogTypes::LOG_TYPE type, const char* file, int line,
const char* function, const char* fmt, ...)
diff --git a/src/common/math_util.cpp b/src/common/math_util.cpp
index 82eceab0..ab0e6b75 100644
--- a/src/common/math_util.cpp
+++ b/src/common/math_util.cpp
@@ -6,8 +6,7 @@
#include "common/common.h"
#include "common/math_util.h"
-#include <cmath>
-#include <numeric>
+#include <numeric> // Necessary on OS X, but not Linux
namespace MathUtil
{
diff --git a/src/common/mem_arena.cpp b/src/common/mem_arena.cpp
index d4dd933b..40d9c03a 100644
--- a/src/common/mem_arena.cpp
+++ b/src/common/mem_arena.cpp
@@ -22,11 +22,7 @@
#include "common/string_util.h"
#ifndef _WIN32
-#include <sys/stat.h>
#include <fcntl.h>
-#include <unistd.h>
-#include <cerrno>
-#include <cstring>
#ifdef ANDROID
#include <sys/ioctl.h>
#include <linux/ashmem.h>
diff --git a/src/common/memory_util.cpp b/src/common/memory_util.cpp
index 1496002e..bab7d9f7 100644
--- a/src/common/memory_util.cpp
+++ b/src/common/memory_util.cpp
@@ -10,9 +10,6 @@
#ifdef _WIN32
#include <windows.h>
#include <psapi.h>
-#else
-#include <cerrno>
-#include <cstdio>
#endif
#if !defined(_WIN32) && defined(__x86_64__) && !defined(MAP_32BIT)
diff --git a/src/common/string_util.cpp b/src/common/string_util.cpp
index bd4c3339..9199e30b 100644
--- a/src/common/string_util.cpp
+++ b/src/common/string_util.cpp
@@ -3,17 +3,13 @@
// Refer to the license.txt file included.
#include <algorithm>
-#include <cstdlib>
-#include <cstdio>
#include "common/common.h"
-#include "common/common_paths.h"
#include "common/string_util.h"
#ifdef _WIN32
#include <Windows.h>
#else
- #include <cerrno>
#include <iconv.h>
#endif
@@ -281,12 +277,17 @@ std::string TabsToSpaces(int tab_size, const std::string &in)
std::string ReplaceAll(std::string result, const std::string& src, const std::string& dest)
{
- while(1)
+ size_t pos = 0;
+
+ if (src == dest)
+ return result;
+
+ while ((pos = result.find(src, pos)) != std::string::npos)
{
- size_t pos = result.find(src);
- if (pos == std::string::npos) break;
result.replace(pos, src.size(), dest);
+ pos += dest.length();
}
+
return result;
}
diff --git a/src/common/thread.cpp b/src/common/thread.cpp
index 83079518..60d8ed07 100644
--- a/src/common/thread.cpp
+++ b/src/common/thread.cpp
@@ -3,7 +3,6 @@
// Refer to the license.txt file included.
#include "common/thread.h"
-#include "common/common.h"
#ifdef __APPLE__
#include <mach/mach.h>
diff --git a/src/common/utf8.cpp b/src/common/utf8.cpp
index c83824d3..be4ebc85 100644
--- a/src/common/utf8.cpp
+++ b/src/common/utf8.cpp
@@ -19,12 +19,8 @@
#endif
#include <cstdlib>
-#include <cstdio>
#include <cstring>
-#include <cstdarg>
-
#include <algorithm>
-#include <string>
#include "common/common_types.h"
#include "common/utf8.h"
diff --git a/src/core/arm/disassembler/load_symbol_map.cpp b/src/core/arm/disassembler/load_symbol_map.cpp
index d7fc0a04..f156c43c 100644
--- a/src/core/arm/disassembler/load_symbol_map.cpp
+++ b/src/core/arm/disassembler/load_symbol_map.cpp
@@ -6,7 +6,6 @@
#include <vector>
#include "common/symbols.h"
-#include "common/common_types.h"
#include "common/file_util.h"
#include "core/arm/disassembler/load_symbol_map.h"
diff --git a/src/core/core.cpp b/src/core/core.cpp
index f21801e5..01d4f0af 100644
--- a/src/core/core.cpp
+++ b/src/core/core.cpp
@@ -3,15 +3,9 @@
// Refer to the license.txt file included.
#include "common/common_types.h"
-#include "common/log.h"
-#include "common/symbols.h"
-
-#include "video_core/video_core.h"
#include "core/core.h"
-#include "core/mem_map.h"
#include "core/hw/hw.h"
-#include "core/hw/gpu.h"
#include "core/arm/disassembler/arm_disasm.h"
#include "core/arm/interpreter/arm_interpreter.h"
diff --git a/src/core/hle/config_mem.cpp b/src/core/hle/config_mem.cpp
index 8c898b26..a45e6142 100644
--- a/src/core/hle/config_mem.cpp
+++ b/src/core/hle/config_mem.cpp
@@ -3,7 +3,6 @@
// Refer to the license.txt file included.
#include "common/common_types.h"
-#include "common/log.h"
#include "core/hle/config_mem.h"
diff --git a/src/core/hle/coprocessor.cpp b/src/core/hle/coprocessor.cpp
index 9a5b0ded..1eb33eb8 100644
--- a/src/core/hle/coprocessor.cpp
+++ b/src/core/hle/coprocessor.cpp
@@ -5,7 +5,6 @@
#include "core/hle/coprocessor.h"
#include "core/hle/hle.h"
#include "core/mem_map.h"
-#include "core/core.h"
namespace HLE {
diff --git a/src/core/hle/hle.cpp b/src/core/hle/hle.cpp
index 53cda4a6..b03894ad 100644
--- a/src/core/hle/hle.cpp
+++ b/src/core/hle/hle.cpp
@@ -6,7 +6,6 @@
#include "core/mem_map.h"
#include "core/hle/hle.h"
-#include "core/hle/svc.h"
#include "core/hle/kernel/thread.h"
#include "core/hle/service/service.h"
diff --git a/src/core/hle/kernel/archive.cpp b/src/core/hle/kernel/archive.cpp
index 1596367c..20536f40 100644
--- a/src/core/hle/kernel/archive.cpp
+++ b/src/core/hle/kernel/archive.cpp
@@ -7,7 +7,6 @@
#include "core/file_sys/archive.h"
#include "core/hle/service/service.h"
-#include "core/hle/kernel/kernel.h"
#include "core/hle/kernel/archive.h"
////////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp
index a4a25887..e56f1879 100644
--- a/src/core/hle/kernel/kernel.cpp
+++ b/src/core/hle/kernel/kernel.cpp
@@ -2,8 +2,6 @@
// Licensed under GPLv2
// Refer to the license.txt file included.
-#include <string.h>
-
#include "common/common.h"
#include "core/core.h"
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp
index 8bd9ca1a..33c0b2a4 100644
--- a/src/core/hle/kernel/thread.cpp
+++ b/src/core/hle/kernel/thread.cpp
@@ -3,10 +3,8 @@
// Refer to the license.txt file included.
#include <algorithm>
-#include <cstdio>
#include <list>
#include <map>
-#include <string>
#include <vector>
#include "common/common.h"
@@ -15,7 +13,6 @@
#include "core/core.h"
#include "core/mem_map.h"
#include "core/hle/hle.h"
-#include "core/hle/svc.h"
#include "core/hle/kernel/kernel.h"
#include "core/hle/kernel/thread.h"
diff --git a/src/core/hle/service/fs.cpp b/src/core/hle/service/fs.cpp
index 5eabf36a..9e1998b0 100644
--- a/src/core/hle/service/fs.cpp
+++ b/src/core/hle/service/fs.cpp
@@ -4,8 +4,6 @@
#include "common/common.h"
-#include "core/loader/loader.h"
-#include "core/hle/hle.h"
#include "core/hle/service/fs.h"
#include "core/hle/kernel/archive.h"
diff --git a/src/core/hle/service/gsp.cpp b/src/core/hle/service/gsp.cpp
index 46c5a8dd..accbe84e 100644
--- a/src/core/hle/service/gsp.cpp
+++ b/src/core/hle/service/gsp.cpp
@@ -7,7 +7,6 @@
#include "common/bit_field.h"
#include "core/mem_map.h"
-#include "core/hle/hle.h"
#include "core/hle/kernel/event.h"
#include "core/hle/kernel/shared_memory.h"
#include "core/hle/service/gsp.h"
diff --git a/src/core/hle/service/ndm.cpp b/src/core/hle/service/ndm.cpp
index 48755b6a..f6af0a15 100644
--- a/src/core/hle/service/ndm.cpp
+++ b/src/core/hle/service/ndm.cpp
@@ -2,8 +2,6 @@
// Licensed under GPLv2
// Refer to the license.txt file included.
-#include "common/log.h"
-
#include "core/hle/hle.h"
#include "core/hle/service/ndm.h"
diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp
index 00ac1c9c..9eb1726a 100644
--- a/src/core/hle/service/service.cpp
+++ b/src/core/hle/service/service.cpp
@@ -3,11 +3,8 @@
// Refer to the license.txt file included.
#include "common/common.h"
-#include "common/log.h"
#include "common/string_util.h"
-#include "core/hle/hle.h"
-
#include "core/hle/service/service.h"
#include "core/hle/service/apt.h"
#include "core/hle/service/fs.h"
@@ -16,8 +13,6 @@
#include "core/hle/service/ndm.h"
#include "core/hle/service/srv.h"
-#include "core/hle/kernel/kernel.h"
-
namespace Service {
Manager* g_manager = nullptr; ///< Service manager
diff --git a/src/core/hle/service/srv.cpp b/src/core/hle/service/srv.cpp
index 23be3cf2..eb2c73f9 100644
--- a/src/core/hle/service/srv.cpp
+++ b/src/core/hle/service/srv.cpp
@@ -4,7 +4,6 @@
#include "core/hle/hle.h"
#include "core/hle/service/srv.h"
-#include "core/hle/service/service.h"
#include "core/hle/kernel/event.h"
////////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/core/hle/svc.cpp b/src/core/hle/svc.cpp
index 0ce3f027..490e05cd 100644
--- a/src/core/hle/svc.cpp
+++ b/src/core/hle/svc.cpp
@@ -3,7 +3,6 @@
// Refer to the license.txt file included.
#include <map>
-#include <string>
#include "common/string_util.h"
#include "common/symbols.h"
@@ -12,13 +11,11 @@
#include "core/hle/kernel/address_arbiter.h"
#include "core/hle/kernel/event.h"
-#include "core/hle/kernel/kernel.h"
#include "core/hle/kernel/mutex.h"
#include "core/hle/kernel/shared_memory.h"
#include "core/hle/kernel/thread.h"
#include "core/hle/function_wrappers.h"
-#include "core/hle/svc.h"
#include "core/hle/service/service.h"
////////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/core/hw/gpu.cpp b/src/core/hw/gpu.cpp
index 8709b8eb..2e094377 100644
--- a/src/core/hw/gpu.cpp
+++ b/src/core/hw/gpu.cpp
@@ -3,13 +3,11 @@
// Refer to the license.txt file included.
#include "common/common_types.h"
-#include "common/log.h"
#include "core/core.h"
#include "core/mem_map.h"
#include "core/hle/hle.h"
-#include "core/hle/kernel/thread.h"
#include "core/hle/service/gsp.h"
#include "core/hw/gpu.h"
diff --git a/src/core/hw/hw.cpp b/src/core/hw/hw.cpp
index ed70486e..efd94f14 100644
--- a/src/core/hw/hw.cpp
+++ b/src/core/hw/hw.cpp
@@ -3,7 +3,6 @@
// Refer to the license.txt file included.
#include "common/common_types.h"
-#include "common/log.h"
#include "core/hw/hw.h"
#include "core/hw/gpu.h"
diff --git a/src/core/hw/ndma.cpp b/src/core/hw/ndma.cpp
index f6aa72d1..158241fd 100644
--- a/src/core/hw/ndma.cpp
+++ b/src/core/hw/ndma.cpp
@@ -3,7 +3,6 @@
// Refer to the license.txt file included.
#include "common/common_types.h"
-#include "common/log.h"
#include "core/hw/ndma.h"
diff --git a/src/core/loader/loader.cpp b/src/core/loader/loader.cpp
index 1f895ed2..577a2297 100644
--- a/src/core/loader/loader.cpp
+++ b/src/core/loader/loader.cpp
@@ -5,7 +5,6 @@
#include <memory>
#include "core/file_sys/archive_romfs.h"
-#include "core/loader/loader.h"
#include "core/loader/elf.h"
#include "core/loader/ncch.h"
#include "core/hle/kernel/archive.h"
diff --git a/src/core/mem_map.cpp b/src/core/mem_map.cpp
index 14fc0147..cf12f24d 100644
--- a/src/core/mem_map.cpp
+++ b/src/core/mem_map.cpp
@@ -6,7 +6,6 @@
#include "common/mem_arena.h"
#include "core/mem_map.h"
-#include "core/core.h"
////////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/core/mem_map_funcs.cpp b/src/core/mem_map_funcs.cpp
index 391b75fc..f510df83 100644
--- a/src/core/mem_map_funcs.cpp
+++ b/src/core/mem_map_funcs.cpp
@@ -8,7 +8,6 @@
#include "core/mem_map.h"
#include "core/hw/hw.h"
-#include "hle/hle.h"
#include "hle/config_mem.h"
namespace Memory {