mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-02-14 11:01:38 +00:00
Global: Cut down on file/string includes.
This commit is contained in:
parent
1af3009e80
commit
667a8522cc
@ -17,6 +17,7 @@
|
||||
|
||||
#include <atomic>
|
||||
#include <algorithm> // min
|
||||
#include <cstring>
|
||||
#include <string> // System: To be able to add strings with "+"
|
||||
#include <math.h>
|
||||
#ifdef _WIN32
|
||||
|
@ -24,6 +24,7 @@
|
||||
|
||||
#include "ppsspp_config.h"
|
||||
|
||||
#include <cstring>
|
||||
#include <memory>
|
||||
#include "FileUtil.h"
|
||||
#include "StringUtils.h"
|
||||
|
@ -35,16 +35,6 @@ inline struct tm* localtime_r(const time_t *clock, struct tm *result) {
|
||||
|
||||
namespace File {
|
||||
|
||||
// FileSystem tree node/
|
||||
struct FSTEntry
|
||||
{
|
||||
bool isDirectory;
|
||||
u64 size; // file length or number of entries from children
|
||||
std::string physicalName; // name on disk
|
||||
std::string virtualName; // name in FST names table
|
||||
std::vector<FSTEntry> children;
|
||||
};
|
||||
|
||||
struct FileDetails {
|
||||
bool isDirectory;
|
||||
u64 size;
|
||||
|
@ -19,13 +19,13 @@
|
||||
|
||||
#include "ppsspp_config.h"
|
||||
|
||||
#include <vector>
|
||||
#include <fstream>
|
||||
#include <mutex>
|
||||
#include <vector>
|
||||
|
||||
#include "file/ini_file.h"
|
||||
#include "Log.h"
|
||||
#include "StringUtils.h"
|
||||
#include "FileUtil.h"
|
||||
|
||||
#define MAX_MESSAGES 8000
|
||||
|
||||
|
@ -15,6 +15,7 @@
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#include <cstring>
|
||||
#include "Common.h"
|
||||
#include "StringUtils.h"
|
||||
|
||||
|
@ -15,6 +15,7 @@
|
||||
// Official git repository and contact information can be found at
|
||||
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
|
||||
|
||||
#include <cstring>
|
||||
#include "file/ini_file.h"
|
||||
#include "Core/Compatibility.h"
|
||||
#include "Core/System.h"
|
||||
|
@ -21,7 +21,8 @@
|
||||
// Does enough to understand what's going on without having to resort to an
|
||||
// external disassembler all the time...
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
|
||||
#include "Common/Arm64Emitter.h"
|
||||
#include "Common/StringUtils.h"
|
||||
|
@ -25,18 +25,19 @@
|
||||
// All credit goes to him and the official miniupnp project! http://miniupnp.free.fr/
|
||||
|
||||
|
||||
#include <string>
|
||||
#include <algorithm>
|
||||
#include <Core/System.h>
|
||||
#include <Core/Host.h>
|
||||
#include <Core/ELF/ParamSFO.h>
|
||||
#include "Core/Util/PortManager.h"
|
||||
#include <Common/Log.h>
|
||||
#include <cstring>
|
||||
#include <string>
|
||||
#include <thread>
|
||||
#include "base/timeutil.h"
|
||||
#include "i18n/i18n.h"
|
||||
#include "net/resolve.h"
|
||||
#include "thread/threadutil.h"
|
||||
#include "base/timeutil.h"
|
||||
#include "Common/Log.h"
|
||||
#include "Core/System.h"
|
||||
#include "Core/Host.h"
|
||||
#include "Core/ELF/ParamSFO.h"
|
||||
#include "Core/Util/PortManager.h"
|
||||
|
||||
|
||||
PortManager g_PortManager;
|
||||
|
@ -1,11 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstdlib>
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
#include <stdarg.h>
|
||||
#include <vector>
|
||||
|
||||
#include "base/basictypes.h"
|
||||
@ -67,26 +63,6 @@ inline void StringToHexString(const std::string &data, std::string *output) {
|
||||
// highly unsafe and not recommended.
|
||||
unsigned int parseHex(const char* _szValue);
|
||||
|
||||
|
||||
// Suitable for inserting into maps, unlike char*, and cheaper than std::string.
|
||||
// Strings must be constant and preferably be stored in the read-only part
|
||||
// of the binary.
|
||||
class ConstString {
|
||||
public:
|
||||
ConstString(const char *ptr) {
|
||||
ptr_ = ptr;
|
||||
}
|
||||
bool operator <(const ConstString &other) const {
|
||||
return strcmp(ptr_, other.ptr_) < 0;
|
||||
}
|
||||
bool operator ==(const ConstString &other) const {
|
||||
return ptr_ == other.ptr_ || !strcmp(ptr_, other.ptr_);
|
||||
}
|
||||
const char *get() const { return ptr_; }
|
||||
private:
|
||||
const char *ptr_;
|
||||
};
|
||||
|
||||
std::string StringFromFormat(const char* format, ...);
|
||||
std::string StringFromInt(int value);
|
||||
std::string StringFromBool(bool value);
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include <algorithm>
|
||||
#include <cstring>
|
||||
#include <set>
|
||||
#include "base/stringutil.h"
|
||||
#include "base/timeutil.h"
|
||||
|
@ -14,7 +14,6 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "base/stringutil.h"
|
||||
#include "file/ini_file.h"
|
||||
|
||||
// Reasonably thread safe.
|
||||
|
Loading…
x
Reference in New Issue
Block a user