lint: add include sorting config to clang-format (#1517)

This commit is contained in:
Tyler Wilding 2022-06-22 23:37:46 -04:00 committed by GitHub
parent b3f2b81481
commit 2d595c1ac0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
501 changed files with 2085 additions and 1264 deletions

View File

@ -1,4 +1,18 @@
---
BasedOnStyle: Chromium
ColumnLimit: 100
SortIncludes: false
SortIncludes: true
IncludeBlocks: Regroup
IncludeCategories:
- Regex: '^<[a-zA-Z_\-\.]+>'
Priority: 1
- Regex: '^"[a-zA-Z_\-\.]+"'
Priority: 2
- Regex: '^(<|")common.*'
Priority: 3
- Regex: '^"third-party.*'
Priority: 4
SortPriority: 5
- Regex: '.*'
Priority: 5
SortPriority: 4

View File

@ -1,5 +1,7 @@
#include "audio_formats.h"
#include "common/util/BinaryWriter.h"
#include "third-party/fmt/core.h"
/*!

View File

@ -3,8 +3,8 @@
#include <string>
#include <vector>
#include "common/util/BinaryReader.h"
#include "common/common_types.h"
#include "common/util/BinaryReader.h"
// The header data for a simple wave file
struct WaveFileHeader {

View File

@ -4,28 +4,32 @@
* Nothing in here should hold state, that should all be managed in Debugger.
*/
#include <cstring>
#include "common/goal_constants.h"
#include "common/util/Timer.h"
#include "third-party/fmt/core.h"
#include "xdbg.h"
#include <cstring>
#include "common/goal_constants.h"
#include "common/util/Timer.h"
#include "third-party/fmt/core.h"
#ifdef __linux
#include <fcntl.h>
#include <unistd.h>
#include <sys/prctl.h>
#include <sys/ptrace.h>
#include <sys/stat.h>
#include <sys/syscall.h>
#include <sys/ptrace.h>
#include <sys/prctl.h>
#include <sys/types.h>
#include <sys/user.h>
#include <sys/wait.h>
#include <fcntl.h>
#elif _WIN32
#define NOMINMAX
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
#include <mutex>
#include <condition_variable>
#include <mutex>
#endif
namespace xdbg {

View File

@ -6,8 +6,9 @@
#pragma once
#include <string>
#include <cstdint>
#include <string>
#include "common/common_types.h"
#ifdef __linux

View File

@ -3,9 +3,10 @@
* Cross platform socket library used for the listener.
*/
// clang-format off
#ifdef __linux
#include <sys/socket.h>
#include <netinet/tcp.h>
#include <sys/socket.h>
#include <unistd.h>
#elif _WIN32
#define WIN32_LEAN_AND_MEAN
@ -17,6 +18,7 @@
#include <string.h>
#include "third-party/fmt/core.h"
// clang-format on
int open_socket(int af, int type, int protocol) {
#ifdef __linux

View File

@ -5,18 +5,20 @@
* Cross platform socket library used for the listener.
*/
// clang-format off
#ifdef __linux
#include <sys/socket.h>
#include <netinet/tcp.h>
#include <unistd.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <sys/socket.h>
#include <unistd.h>
#elif _WIN32
#define NOMINMAX
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
#include <WinSock2.h>
#endif
// clang-format on
#ifdef __linux
const int TCP_SOCKET_LEVEL = SOL_TCP;

View File

@ -1,8 +1,10 @@
#include "XSocketClient.h"
#include "common/cross_sockets/XSocket.h"
#include <string>
#include "common/cross_sockets/XSocket.h"
// clang-format off
#ifdef _WIN32
#define NOMINMAX
#define WIN32_LEAN_AND_MEAN
@ -11,7 +13,9 @@
#include <WS2tcpip.h>
#endif
#include "common/nrepl/ReplServer.h"
#include "third-party/fmt/core.h"
// clang-format on
XSocketClient::XSocketClient(int _tcp_port) {
tcp_port = _tcp_port;

View File

@ -1,11 +1,11 @@
#pragma once
#include "common/cross_sockets/XSocket.h"
#include <thread>
#include "common/common_types.h"
#include <functional>
#include <mutex>
#include <thread>
#include "common/common_types.h"
#include "common/cross_sockets/XSocket.h"
/// @brief A cross platform generic socket client implementation
class XSocketClient {

View File

@ -1,9 +1,10 @@
// clang-format off
#include "XSocketServer.h"
#include "third-party/fmt/core.h"
#include "common/cross_sockets/XSocket.h"
#include "third-party/fmt/core.h"
#ifdef _WIN32
#define NOMINMAX
#define WIN32_LEAN_AND_MEAN
@ -11,6 +12,7 @@
#include <WinSock2.h>
#include <WS2tcpip.h>
#endif
// clang-format on
XSocketServer::XSocketServer(std::function<bool()> shutdown_callback,
int _tcp_port,

View File

@ -1,11 +1,11 @@
#pragma once
#include "common/cross_sockets/XSocket.h"
#include <thread>
#include "common/common_types.h"
#include <functional>
#include <mutex>
#include <thread>
#include "common/common_types.h"
#include "common/cross_sockets/XSocket.h"
/// @brief A cross platform generic socket server implementation
class XSocketServer {

View File

@ -1,6 +1,8 @@
#include <functional>
#include <algorithm>
#include "Tfrag3Data.h"
#include <algorithm>
#include <functional>
#include "common/util/Assert.h"
namespace tfrag3 {

View File

@ -5,9 +5,9 @@
#include "common/common_types.h"
#include "common/dma/gs.h"
#include "common/util/Serializer.h"
#include "common/math/Vector.h"
#include "common/util/Assert.h"
#include "common/util/Serializer.h"
namespace tfrag3 {

View File

@ -1,4 +1,5 @@
#include "pack_helpers.h"
#include <map>
constexpr float kClusterSize = 4096 * 40; // 100 in-game meters

View File

@ -1,10 +1,12 @@
#include "subtitles.h"
#include <algorithm>
#include <regex>
#include "common/util/FileUtil.h"
#include "third-party/fmt/core.h"
#include "third-party/fmt/ranges.h"
#include <regex>
#include "common/util/FileUtil.h"
#include "third-party/json.hpp"
bool write_subtitle_db_to_files(const GameSubtitleDB& db) {

View File

@ -1,8 +1,9 @@
#include "dma.h"
#include "third-party/fmt/core.h"
#include "common/util/Assert.h"
#include "third-party/fmt/core.h"
std::string DmaTag::print() {
std::string result;
const char* mode_names[8] = {"refe", "cnt", "next", "ref", "refs", "call", "ret", "end"};

View File

@ -5,10 +5,12 @@
* PS2 DMA and VIF types.
*/
#include <string>
#include <cstring>
#include <string>
#include "common/common_types.h"
#include "common/util/Assert.h"
#include "third-party/fmt/core.h"
struct DmaStats {

View File

@ -1,6 +1,7 @@
#pragma once
#include <cstring>
#include "common/dma/dma.h"
#include "common/util/Assert.h"

View File

@ -1,10 +1,12 @@
#include "common/goal_constants.h"
#include "common/dma/dma_chain_read.h"
#include "dma_copy.h"
#include "third-party/fmt/core.h"
#include "common/dma/dma_chain_read.h"
#include "common/goal_constants.h"
#include "common/util/Timer.h"
#include "third-party/fmt/core.h"
/*!
* Convert a DMA chain to an array of bytes that can be directly fed to VIF.
*/

View File

@ -1,8 +1,9 @@
#include "gs.h"
#include "third-party/fmt/core.h"
#include "common/util/Assert.h"
#include "third-party/fmt/core.h"
std::string reg_descriptor_name(GifTag::RegisterDescriptor reg) {
switch (reg) {
case GifTag::RegisterDescriptor::PRIM:

View File

@ -1,13 +1,16 @@
// clang-format off
#include "GlobalProfiler.h"
#include <thread>
#include <cstring>
#include <chrono>
#include "third-party/fmt/core.h"
#include "third-party/json.hpp"
#include <cstring>
#include <thread>
#include "common/util/Assert.h"
#include "common/util/FileUtil.h"
#include "third-party/fmt/core.h"
#include "third-party/json.hpp"
#ifdef __linux__
u32 get_current_tid() {
return (u32)pthread_self();
@ -21,6 +24,7 @@ u32 get_current_tid() {
return (u32)GetCurrentThreadId();
}
#endif
// clang-format on
u64 get_current_ts() {
return std::chrono::steady_clock::now().time_since_epoch().count();

View File

@ -1,9 +1,10 @@
#pragma once
#include "common/common_types.h"
#include <vector>
#include <string>
#include <atomic>
#include <string>
#include <vector>
#include "common/common_types.h"
struct ProfNode {
u64 ts;

View File

@ -3,10 +3,14 @@
* The GOOS Interpreter and implementation of special and "built-in forms"
*/
#include <utility>
#include "Interpreter.h"
#include <utility>
#include "ParseHelpers.h"
#include "common/util/FileUtil.h"
#include "third-party/fmt/core.h"
namespace goos {

View File

@ -7,6 +7,7 @@
#include <memory>
#include <optional>
#include "Object.h"
#include "Reader.h"

View File

@ -38,12 +38,15 @@
*
*/
#include <cinttypes>
#include "Object.h"
#include <cinttypes>
#include "common/util/FileUtil.h"
#include "third-party/fmt/core.h"
#include "common/util/print_float.h"
#include "third-party/fmt/core.h"
namespace goos {
/*!

View File

@ -43,14 +43,15 @@
*
*/
#include <string>
#include <map>
#include <memory>
#include <stdexcept>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
#include <stdexcept>
#include <map>
#include "common/common_types.h"
#include "common/util/Assert.h"

View File

@ -1,4 +1,5 @@
#include "ParseHelpers.h"
#include "third-party/fmt/core.h"
namespace goos {

View File

@ -2,8 +2,9 @@
#include <optional>
#include <string>
#include <vector>
#include <unordered_map>
#include <vector>
#include "Object.h"
namespace goos {

View File

@ -4,17 +4,20 @@
* It is not very good, but significantly better than putting everything on one line
*/
#include "PrettyPrinter.h"
#include <cstring>
#include <stdexcept>
#include <utility>
#include <cstring>
#include "PrettyPrinter.h"
#include "Reader.h"
#include "third-party/fmt/core.h"
#include "common/log/log.h"
#include "common/goos/PrettyPrinter2.h"
#include "common/log/log.h"
#include "common/util/Assert.h"
#include "third-party/fmt/core.h"
namespace pretty_print {
/*!

View File

@ -8,10 +8,11 @@
#include <string>
#include <vector>
#include "common/goos/Object.h"
#include "common/goos/Reader.h"
#include "common/goos/Printer.h"
#include "common/goos/PrettyPrinter2.h"
#include "common/goos/Printer.h"
#include "common/goos/Reader.h"
namespace pretty_print {
// main pretty print function

View File

@ -1,8 +1,10 @@
#include "PrettyPrinter2.h"
#include "common/common_types.h"
#include "third-party/fmt/core.h"
#include "common/util/Assert.h"
#include "third-party/fmt/core.h"
namespace pretty_print {
namespace v2 {

View File

@ -2,9 +2,10 @@
#include <string>
#include <vector>
#include "common/goos/Object.h"
#include "common/goos/Reader.h"
#include "common/goos/Printer.h"
#include "common/goos/Reader.h"
namespace pretty_print {
// main pretty print function

View File

@ -1,4 +1,5 @@
#include "Printer.h"
#include "third-party/fmt/core.h"
namespace pretty_print {

View File

@ -2,6 +2,7 @@
#include <string>
#include <vector>
#include "common/goos/Object.h"
#include "common/goos/Reader.h"

View File

@ -10,11 +10,15 @@
*/
#include "Reader.h"
#include <filesystem>
#include "ReplUtils.h"
#include "common/util/FileUtil.h"
#include "common/util/FontUtils.h"
#include "third-party/fmt/core.h"
#include <filesystem>
#include "ReplUtils.h"
namespace goos {

View File

@ -12,15 +12,14 @@
*/
#include <memory>
#include <utility>
#include <unordered_map>
#include <optional>
#include "common/goos/Object.h"
#include "common/goos/TextDB.h"
#include <unordered_map>
#include <utility>
#include "ReplUtils.h"
#include "common/goos/Object.h"
#include "common/goos/TextDB.h"
#include "common/util/Assert.h"
namespace goos {

View File

@ -1,10 +1,11 @@
#include "ReplUtils.h"
#include "common/util/FileUtil.h"
#include "third-party/replxx/include/replxx.hxx"
#include "common/versions.h"
#include "third-party/fmt/color.h"
#include "third-party/fmt/core.h"
#include "third-party/replxx/include/replxx.hxx"
// TODO - expand a list of hints (ie. a hint for defun to show at a glance how to write a function,
// or perhaps, show the docstring for the current function being used?)

View File

@ -11,11 +11,12 @@
* (+ 1 (+ a b)) ; compute the sum
*/
#include "common/util/FileUtil.h"
#include "third-party/fmt/core.h"
#include "TextDB.h"
#include "common/util/FileUtil.h"
#include "third-party/fmt/core.h"
namespace goos {
/*!

View File

@ -13,12 +13,12 @@
* (+ 1 (+ a b)) ; compute the sum
*/
#include <string>
#include <vector>
#include <stdexcept>
#include <unordered_map>
#include <memory>
#include <optional>
#include <stdexcept>
#include <string>
#include <unordered_map>
#include <vector>
#include "common/goos/Object.h"

View File

@ -1,8 +1,10 @@
#include "log.h"
#include <cstdio>
#include <cstdlib>
#include <mutex>
#include "third-party/fmt/color.h"
#include "log.h"
#ifdef _WIN32 // see lg::initialize
#define NOMINMAX
#define WIN32_LEAN_AND_MEAN

View File

@ -6,6 +6,7 @@
#include <sys/time.h>
#endif
#include <string>
#include "third-party/fmt/core.h"
namespace lg {

View File

@ -1,9 +1,10 @@
// clang-format off
#include "ReplClient.h"
#include "common/cross_sockets/XSocket.h"
#include "common/versions.h"
#include "third-party/fmt/core.h"
#include "common/versions.h"
#ifdef _WIN32
#define NOMINMAX
@ -12,6 +13,7 @@
#include <WinSock2.h>
#include <WS2tcpip.h>
#endif
// clang-format on
void ReplClient::eval(std::string form) {
if (!is_connected()) {

View File

@ -1,8 +1,9 @@
#pragma once
#include "common/cross_sockets/XSocketClient.h"
#include "ReplServer.h"
#include "common/cross_sockets/XSocketClient.h"
class ReplClient : public XSocketClient {
public:
using XSocketClient::XSocketClient;

View File

@ -1,9 +1,10 @@
// clang-format off
#include "ReplServer.h"
#include "common/cross_sockets/XSocket.h"
#include <common/versions.h>
#include "third-party/fmt/core.h"
#include <common/versions.h>
#ifdef _WIN32
#define NOMINMAX
@ -12,6 +13,7 @@
#include <WinSock2.h>
#include <WS2tcpip.h>
#endif
// clang-format on
// TODO - basically REPL to listen and inject commands into a running REPL
// - we will need a C++ side client as well which will let us communicate with the repl via for

View File

@ -1,8 +1,9 @@
#pragma once
#include "common/cross_sockets/XSocketServer.h"
#include <set>
#include <optional>
#include <set>
#include "common/cross_sockets/XSocketServer.h"
enum ReplServerMessageType { PING = 0, EVAL = 10, SHUTDOWN = 20 };

View File

@ -1,10 +1,12 @@
#include "subtitles.h"
#include "common/goos/ParseHelpers.h"
#include "common/goos/Reader.h"
#include "common/util/FileUtil.h"
#include "third-party/fmt/core.h"
#include "common/util/json_util.h"
#include "third-party/fmt/core.h"
static const std::unordered_map<std::string, GameTextVersion> s_text_ver_enum_map = {
{"jak1-v1", GameTextVersion::JAK1_V1},
{"jak1-v2", GameTextVersion::JAK1_V2}};

View File

@ -1,13 +1,14 @@
#pragma once
#include "common/util/FontUtils.h"
#include "common/util/Assert.h"
#include "common/goos/Object.h"
#include <string>
#include <map>
#include <unordered_set>
#include <memory>
#include <algorithm>
#include <map>
#include <memory>
#include <string>
#include <unordered_set>
#include "common/goos/Object.h"
#include "common/util/Assert.h"
#include "common/util/FontUtils.h"
/*!
* The text bank contains all lines (accessed with an ID) for a language.

View File

@ -1,6 +1,7 @@
#pragma once
#include "common/common_types.h"
#include "common/util/Assert.h"
/*!
* Convert from a pixel location in a texture (x, y, texture buffer width) to VRAM address (byte).

View File

@ -3,11 +3,14 @@
* Representation of a GOAL type in the type system.
*/
#include <stdexcept>
#include "third-party/fmt/core.h"
#include "Type.h"
#include <stdexcept>
#include "common/util/Assert.h"
#include "third-party/fmt/core.h"
namespace {
std::string reg_kind_to_string(RegClass kind) {
switch (kind) {

View File

@ -5,11 +5,13 @@
* Representation of a GOAL type in the type system.
*/
#include <string>
#include <map>
#include <string>
#include <unordered_map>
#include "common/goal_constants.h"
#include "TypeSpec.h"
#include "common/goal_constants.h"
#include "common/util/Assert.h"
class TypeSystem;

View File

@ -4,9 +4,11 @@
*/
#include <algorithm>
#include "third-party/fmt/core.h"
#include "TypeSystem.h"
#include "third-party/fmt/core.h"
namespace {
// debug prints for the reverse lookup
bool debug_reverse_lookup = false;

View File

@ -3,8 +3,10 @@
* A GOAL TypeSpec is a reference to a type or compound type.
*/
#include <stdexcept>
#include "TypeSpec.h"
#include <stdexcept>
#include "third-party/fmt/core.h"
bool TypeTag::operator==(const TypeTag& other) const {

View File

@ -5,11 +5,12 @@
* A GOAL TypeSpec is a reference to a type or compound type.
*/
#include <vector>
#include <string>
#include <optional>
#include "common/util/SmallVector.h"
#include <string>
#include <vector>
#include "common/util/Assert.h"
#include "common/util/SmallVector.h"
/*!
* A :name value modifier to apply to a type.

View File

@ -5,12 +5,15 @@
* access types, and reverse type lookups.
*/
#include "third-party/fmt/core.h"
#include "third-party/fmt/color.h"
#include <stdexcept>
#include "TypeSystem.h"
#include "common/util/math_util.h"
#include <stdexcept>
#include "common/util/Assert.h"
#include "common/util/math_util.h"
#include "third-party/fmt/color.h"
#include "third-party/fmt/core.h"
namespace {
template <typename... Args>

View File

@ -7,16 +7,16 @@
* access types, and reverse type lookups.
*/
#include <memory>
#include <optional>
#include <stdexcept>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#include <string>
#include <memory>
#include <stdexcept>
#include <optional>
#include "TypeSpec.h"
#include "Type.h"
#include "TypeSpec.h"
struct TypeFlags {
union {

View File

@ -4,12 +4,15 @@
* This is used both in the compiler and in the decompiler for the type definition file.
*/
#include "common/goos/ParseHelpers.h"
#include "defenum.h"
#include "deftype.h"
#include "third-party/fmt/core.h"
#include "common/goos/ParseHelpers.h"
#include "common/util/BitUtils.h"
#include "third-party/fmt/core.h"
namespace {
const goos::Object& car(const goos::Object* x) {
if (!x->is_pair()) {

View File

@ -7,6 +7,7 @@
*/
#include "TypeSystem.h"
#include "common/goos/Object.h"
EnumType* parse_defenum(const goos::Object& defenum, TypeSystem* ts);

View File

@ -4,8 +4,10 @@
* This is used both in the compiler and in the decompiler for the type definition file.
*/
#include "common/goos/ParseHelpers.h"
#include "deftype.h"
#include "common/goos/ParseHelpers.h"
#include "third-party/fmt/core.h"
/*!

View File

@ -7,6 +7,7 @@
*/
#include "TypeSystem.h"
#include "common/goos/Object.h"
struct DeftypeResult {

View File

@ -1,4 +1,5 @@
#include "state.h"
#include "common/type_system/TypeSystem.h"
/*!

View File

@ -1,6 +1,7 @@
#pragma once
#include <optional>
#include "common/type_system/TypeSpec.h"
/*!

View File

@ -8,6 +8,7 @@
#include <cstdint>
#include <cstring>
#include <vector>
#include "common/common_types.h"
#include "common/util/Assert.h"

View File

@ -5,10 +5,11 @@
* Write raw data like a stream.
*/
#include <stdexcept>
#include <vector>
#include <cstdint>
#include <cstring>
#include <stdexcept>
#include <vector>
#include "common/util/Assert.h"
struct BinaryWriterRef {

View File

@ -1,9 +1,10 @@
#pragma once
#include <optional>
#include "common/util/Range.h"
#include "common/common_types.h"
#include "common/util/Assert.h"
#include "common/util/Range.h"
constexpr int BITS_PER_BYTE = 8;
template <typename T>

View File

@ -1,4 +1,5 @@
#include <utility>
#include "common/util/Assert.h"
/*

View File

@ -1,13 +1,17 @@
#include <cstring>
#include <utility>
#include <unordered_set>
#include "DgoReader.h"
#include <cstring>
#include <unordered_set>
#include <utility>
#include "BinaryReader.h"
#include "common/link_types.h"
#include "third-party/json.hpp"
#include "BitUtils.h"
#include "dgo_util.h"
#include "common/link_types.h"
#include "third-party/json.hpp"
DgoReader::DgoReader(std::string file_name, const std::vector<u8>& data)
: m_file_name(std::move(file_name)) {
BinaryReader reader(data);

View File

@ -1,7 +1,8 @@
#pragma once
#include <vector>
#include <string>
#include <vector>
#include "common/common_types.h"
struct DgoDataEntry {

View File

@ -3,9 +3,10 @@
* Create a DGO from existing files.
*/
#include "DgoWriter.h"
#include "BinaryWriter.h"
#include "FileUtil.h"
#include "DgoWriter.h"
void build_dgo(const DgoDescription& description) {
BinaryWriter writer;

View File

@ -5,8 +5,8 @@
* Create a DGO from existing files.
*/
#include <vector>
#include <string>
#include <vector>
struct DgoDescription {
std::string dgo_name;

View File

@ -4,23 +4,25 @@
*/
#include "FileUtil.h"
#include <iostream>
#include <filesystem>
#include <cstdio> /* defines FILENAME_MAX */
#include <fstream>
#include <sstream>
#include <cstdlib>
#include "common/util/BinaryReader.h"
#include <filesystem>
#include <fstream>
#include <iostream>
#include <sstream>
#include "BinaryWriter.h"
#include "common/common_types.h"
#include "common/util/BinaryReader.h"
// This disables the use of PCLMULQDQ which is probably ok, but let's just be safe and disable it
// because nobody will care if png compression is 10% slower.
#define FPNG_NO_SSE 1
#include "third-party/fpng/fpng.cpp"
#include "third-party/fpng/fpng.h"
#include "third-party/fmt/core.h"
#include "third-party/fpng/fpng.cpp"
#include "third-party/fpng/fpng.h"
#include "third-party/lzokay/lzokay.hpp"
#ifdef _WIN32
@ -28,8 +30,8 @@
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
#else
#include <unistd.h>
#include <cstring>
#include <unistd.h>
#endif
#include "common/util/Assert.h"
#include <common/log/log.h>

View File

@ -5,10 +5,11 @@
* Utility functions for reading and writing files.
*/
#include <string>
#include <vector>
#include <filesystem>
#include <optional>
#include <string>
#include <vector>
#include "common/common_types.h"
namespace fs = std::filesystem;

View File

@ -7,8 +7,10 @@
* Always verify the encoding if string detection suddenly goes awry.
*/
#include <algorithm>
#include "FontUtils.h"
#include <algorithm>
#include "third-party/fmt/core.h"
GameTextFontBank::GameTextFontBank(GameTextVersion version,

View File

@ -9,12 +9,12 @@
* Always verify the encoding if string detection suddenly goes awry.
*/
#include "common/common_types.h"
#include <string>
#include <vector>
#include <unordered_set>
#include <map>
#include <string>
#include <unordered_set>
#include <vector>
#include "common/common_types.h"
// version of the game text file's text encoding. Not real, but we need to differentiate them
// somehow, since the encoding changes.

View File

@ -1,4 +1,5 @@
#include "FrameLimiter.h"
#include <thread>
double FrameLimiter::round_to_nearest_60fps(double current) {

View File

@ -3,6 +3,7 @@
#include <cstring>
#include <string>
#include <vector>
#include "common/common_types.h"
#include "common/util/Assert.h"

View File

@ -1,4 +1,5 @@
#include "SimpleThreadGroup.h"
#include "common/util/Assert.h"
void SimpleThreadGroup::run(const std::function<void(int)>& func, int num_runs) {

View File

@ -1,6 +1,6 @@
#include <functional>
#include <thread>
#include <vector>
#include <functional>
/*!
* Very simple group of threads.

View File

@ -5,6 +5,7 @@
#include <new>
#include <type_traits>
#include <utility>
#include "common/util/Assert.h"
namespace cu {

View File

@ -2,6 +2,7 @@
#include <cstdint>
#include <ctime>
#include "common/util/Assert.h"
/*!

View File

@ -1,7 +1,8 @@
#pragma once
#include <vector>
#include <string>
#include <vector>
#include "common/util/Assert.h"
/*!

View File

@ -1,10 +1,12 @@
#include <cstring>
#include <cstdio>
#include "compress.h"
#include "third-party/zstd/lib/zstd.h"
#include <cstdio>
#include <cstring>
#include "common/util/Assert.h"
#include "third-party/fmt/core.h"
#include "third-party/zstd/lib/zstd.h"
namespace compression {

View File

@ -1,6 +1,7 @@
#pragma once
#include <vector>
#include "common/common_types.h"
namespace compression {
// compress and decompress data with zstd

View File

@ -1,4 +1,5 @@
#include <cstdlib>
#include "common/common_types.h"
u32 crc32(const u8* data, size_t size);

View File

@ -1,8 +1,11 @@
#include <cstring>
#include "dgo_util.h"
#include "common/versions.h"
#include "third-party/fmt/core.h"
#include <cstring>
#include "common/util/Assert.h"
#include "common/versions.h"
#include "third-party/fmt/core.h"
/*!
* Assert false if the char[] has non-null data after the null terminated string.

View File

@ -1,6 +1,7 @@
#pragma once
#include <string>
#include "common/common_types.h"
#include "common/versions.h"

View File

@ -32,12 +32,12 @@
#include "diff.h"
#include <vector>
#include <algorithm>
#include <map>
#include <list>
#include <map>
#include <ostream>
#include <sstream>
#include <vector>
namespace {
enum EditType { kMatch, kAdd, kRemove, kReplace };

View File

@ -1,5 +1,6 @@
#include "common/log/log.h"
#include "json_util.h"
#include "common/log/log.h"
#include "common/util/Assert.h"
/*!

View File

@ -1,7 +1,9 @@
#pragma once
#include <stdexcept>
#include "common/util/Range.h"
#include "third-party/json.hpp"
std::string strip_cpp_style_comments(const std::string& input);

View File

@ -1,10 +1,12 @@
#include "print_float.h"
#include <cmath>
#include "common/goal_constants.h"
#include "common/util/Assert.h"
#include "third-party/dragonbox.h"
#include "third-party/fmt/core.h"
#include "print_float.h"
#include "common/goal_constants.h"
#include "common/util/Assert.h"
/*!
* Convert a float to a string. The string is _always_ in this format:

View File

@ -1,6 +1,7 @@
#pragma once
#include <string>
#include "common/common_types.h"
float fixed_point_to_float(s64 value, s64 scale);

View File

@ -1,6 +1,7 @@
#include "read_iso_file.h"
#include "common/log/log.h"
#include "common/common_types.h"
#include "common/log/log.h"
#include "common/util/Assert.h"
#include "common/util/FileUtil.h"

View File

@ -1,8 +1,9 @@
#pragma once
#include <filesystem>
#include <string>
#include <vector>
#include <filesystem>
#include "third-party/xxhash.hpp"
struct IsoFile {

View File

@ -5,10 +5,13 @@
*/
#include "Instruction.h"
#include "decompiler/ObjectFile/LinkedObjectFile.h"
#include "third-party/fmt/core.h"
#include "common/util/Assert.h"
#include "decompiler/ObjectFile/LinkedObjectFile.h"
#include "third-party/fmt/core.h"
namespace decompiler {
/*!
* Convert atom to a string for disassembly.

View File

@ -7,6 +7,7 @@
*/
#include <vector>
#include "OpcodeInfo.h"
#include "Register.h"

View File

@ -4,11 +4,14 @@
* This is the part of the disassembler that decodes MIPS instructions.
*/
#include "third-party/fmt/core.h"
#include "InstructionDecode.h"
#include "decompiler/ObjectFile/LinkedObjectFile.h"
#include "common/util/Assert.h"
#include "decompiler/ObjectFile/LinkedObjectFile.h"
#include "third-party/fmt/core.h"
namespace decompiler {
// utility class to extract fields of an opcode.
struct OpcodeFields {

View File

@ -4,6 +4,7 @@
*/
#include "InstructionMatching.h"
#include "common/util/Assert.h"
namespace decompiler {

View File

@ -6,6 +6,7 @@
*/
#include "Instruction.h"
#include "decompiler/util/MatchParam.h"
namespace decompiler {

View File

@ -1,9 +1,12 @@
#include <algorithm>
#include <stdexcept>
#include <optional>
#include "common/common_types.h"
#include "InstructionParser.h"
#include <algorithm>
#include <optional>
#include <stdexcept>
#include "common/common_types.h"
#include "common/util/Assert.h"
#include "third-party/fmt/core.h"
namespace decompiler {

View File

@ -7,8 +7,9 @@
#include <string>
#include <unordered_map>
#include "Instruction.h"
#include "DecompilerLabel.h"
#include "Instruction.h"
namespace decompiler {
struct ParsedProgram {

View File

@ -4,6 +4,7 @@
*/
#include "OpcodeInfo.h"
#include "common/util/Assert.h"
namespace decompiler {

Some files were not shown because too many files have changed in this diff Show More