Global: Cut down on file/string includes.

This commit is contained in:
Unknown W. Brackets 2020-08-10 02:20:07 +00:00
parent 1af3009e80
commit 667a8522cc
11 changed files with 17 additions and 45 deletions

View File

@ -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

View File

@ -24,6 +24,7 @@
#include "ppsspp_config.h"
#include <cstring>
#include <memory>
#include "FileUtil.h"
#include "StringUtils.h"

View File

@ -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;

View File

@ -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

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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;

View File

@ -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);

View File

@ -1,4 +1,5 @@
#include <algorithm>
#include <cstring>
#include <set>
#include "base/stringutil.h"
#include "base/timeutil.h"

View File

@ -14,7 +14,6 @@
#include <string>
#include <vector>
#include "base/stringutil.h"
#include "file/ini_file.h"
// Reasonably thread safe.