forked from mirrors/0ad
Fix some includes in source/lib
Make include-what-you-use happy with some files in source/lib and fix what needs to be fixed. Ref: #8086 Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2021 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@@ -29,6 +29,7 @@
|
||||
#include "maths/MathUtil.h"
|
||||
#include "ps/Filesystem.h"
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <algorithm>
|
||||
#include <vector>
|
||||
|
||||
|
||||
@@ -28,12 +28,16 @@
|
||||
#define INCLUDED_CACHE_ADT
|
||||
|
||||
#include "lib/debug.h"
|
||||
#include "lib/status.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cfloat>
|
||||
#include <cstddef>
|
||||
#include <list>
|
||||
#include <queue> // std::priority_queue
|
||||
#include <unordered_map>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
/*
|
||||
Cache for items of variable size and value/"cost".
|
||||
|
||||
@@ -24,7 +24,10 @@
|
||||
#define INCLUDED_ALLOCATORS_DYNAMIC_ARENA
|
||||
|
||||
#include "lib/bits.h"
|
||||
#include "lib/code_annotation.h"
|
||||
#include "lib/debug.h"
|
||||
|
||||
#include <cstdint>
|
||||
#include <cstdlib>
|
||||
#include <new> // bad_alloc
|
||||
#include <utility>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2021 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
@@ -23,6 +23,7 @@
|
||||
#ifndef INCLUDED_STL_ALLOCATORS
|
||||
#define INCLUDED_STL_ALLOCATORS
|
||||
|
||||
#include <cstddef>
|
||||
#include <memory>
|
||||
#include <type_traits>
|
||||
|
||||
|
||||
@@ -24,8 +24,11 @@
|
||||
#define INCLUDED_ALLOCATORS_ALLOCATOR_CHECKER
|
||||
|
||||
#include "lib/debug.h"
|
||||
#include "lib/status.h"
|
||||
|
||||
#include <cstddef>
|
||||
#include <map>
|
||||
#include <utility>
|
||||
|
||||
/**
|
||||
* allocator test rig.
|
||||
|
||||
@@ -29,9 +29,15 @@
|
||||
|
||||
#include "lib/alignment.h" // pageSize
|
||||
#include "lib/allocators/stateless_allocators.h"
|
||||
#include "lib/allocators/freelist.h"
|
||||
#include "lib/code_annotation.h"
|
||||
#include "lib/debug.h"
|
||||
#include "lib/sysdep/vm.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstdint>
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
#include <utility>
|
||||
|
||||
namespace Allocators {
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#ifndef INCLUDED_ALLOCATORS_DYNARRAY
|
||||
#define INCLUDED_ALLOCATORS_DYNARRAY
|
||||
|
||||
#include "lib/debug.h"
|
||||
#include "lib/status.h"
|
||||
#include "lib/types.h"
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2011 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
@@ -23,8 +23,8 @@
|
||||
#ifndef INCLUDED_ALLOCATORS_OVERRUN_PROTECTOR
|
||||
#define INCLUDED_ALLOCATORS_OVERRUN_PROTECTOR
|
||||
|
||||
#include "lib/code_annotation.h"
|
||||
#include "lib/config2.h" // CONFIG2_ALLOCATORS_OVERRUN_PROTECTION
|
||||
#include "lib/sysdep/vm.h"
|
||||
|
||||
/**
|
||||
OverrunProtector wraps an arbitrary object in isolated page(s) and
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2024 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
@@ -21,10 +21,14 @@
|
||||
*/
|
||||
|
||||
#include "precompiled.h"
|
||||
#include "lib/allocators/page_aligned.h"
|
||||
|
||||
#include "page_aligned.h"
|
||||
|
||||
#include "lib/alignment.h"
|
||||
#include "lib/debug.h"
|
||||
#include "lib/posix/posix_mman.h"
|
||||
|
||||
#include <cerrno>
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
#ifndef INCLUDED_ALLOCATORS_PAGE_ALIGNED
|
||||
#define INCLUDED_ALLOCATORS_PAGE_ALIGNED
|
||||
|
||||
#include "lib/posix/posix_mman.h" // PROT_*
|
||||
#include "lib/debug.h"
|
||||
#include "lib/status.h"
|
||||
#include "lib/types.h"
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#define INCLUDED_ALLOCATORS_SHARED_PTR
|
||||
|
||||
#include "lib/alignment.h"
|
||||
#include "lib/status.h"
|
||||
#include "lib/debug.h"
|
||||
#include "lib/sysdep/rtl.h" // rtl_AllocateAligned
|
||||
#include "lib/types.h"
|
||||
|
||||
|
||||
@@ -23,11 +23,12 @@
|
||||
#ifndef INCLUDED_STATELESS_ALLOCATORS
|
||||
#define INCLUDED_STATELESS_ALLOCATORS
|
||||
|
||||
#include "lib/alignment.h"
|
||||
#include "lib/posix/posix_mman.h"
|
||||
#include "lib/sysdep/rtl.h"
|
||||
#include "lib/sysdep/vm.h"
|
||||
|
||||
#include <cstdlib>
|
||||
#include <memory>
|
||||
|
||||
// NB: STL allocators are parameterized on the object type and indicate
|
||||
// the number of elements to [de]allocate. however, these adapters are
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2021 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
@@ -27,6 +27,7 @@
|
||||
|
||||
#include <functional>
|
||||
#include <map>
|
||||
#include <string_view>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2022 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
@@ -91,8 +91,12 @@ extern const wchar_t*, translate, (const wchar_t* text), (text), return)
|
||||
#ifndef INCLUDED_APP_HOOKS
|
||||
#define INCLUDED_APP_HOOKS
|
||||
|
||||
#include "lib/debug.h"
|
||||
#include "lib/os_path.h"
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdio>
|
||||
|
||||
// trampolines for user code to call the hooks. they encapsulate
|
||||
// the details of how exactly to do this.
|
||||
|
||||
|
||||
+3
-2
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2024 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
@@ -38,11 +38,12 @@
|
||||
|
||||
#include "lib/alignment.h"
|
||||
#include "lib/code_annotation.h"
|
||||
#include "lib/code_generation.h"
|
||||
#include "lib/status.h"
|
||||
#include "lib/sysdep/compiler.h"
|
||||
#include "lib/types.h"
|
||||
|
||||
#include <atomic>
|
||||
#include <cstddef>
|
||||
|
||||
/**
|
||||
* trigger a breakpoint when reached/"called".
|
||||
|
||||
@@ -31,7 +31,6 @@
|
||||
#include "lib/file/file_system.h" // FileInfo
|
||||
#include "lib/file/vfs/vfs_path.h"
|
||||
#include "lib/os_path.h"
|
||||
#include "lib/path.h"
|
||||
#include "lib/status.h"
|
||||
#include "lib/types.h"
|
||||
|
||||
@@ -39,6 +38,8 @@
|
||||
#include <ctime>
|
||||
#include <memory>
|
||||
|
||||
class Path;
|
||||
|
||||
// rationale: this module doesn't build a directory tree of the entries
|
||||
// within an archive. that task is left to the VFS; here, we are only
|
||||
// concerned with enumerating all archive entries.
|
||||
|
||||
@@ -54,6 +54,7 @@
|
||||
#include <cstring>
|
||||
#include <ctime>
|
||||
#include <exception>
|
||||
#include <fcntl.h>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2022 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
@@ -28,6 +28,7 @@
|
||||
#define INCLUDED_ARCHIVE_ZIP
|
||||
|
||||
#include "lib/file/archive/archive.h"
|
||||
#include "lib/os_path.h"
|
||||
|
||||
/**
|
||||
* @return 0 if opening the archive failed (e.g. because an external program is holding on to it)
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
#define INCLUDED_STREAM
|
||||
|
||||
#include "lib/code_annotation.h"
|
||||
#include "lib/debug.h"
|
||||
#include "lib/file/archive/codec.h"
|
||||
#include "lib/status.h"
|
||||
#include "lib/types.h"
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
@@ -22,11 +22,16 @@
|
||||
|
||||
#include "lib/self_test.h"
|
||||
|
||||
#include "lib/file/archive/archive.h"
|
||||
#include "lib/file/archive/archive_zip.h"
|
||||
#include "lib/file/file_system.h"
|
||||
#include "lib/file/io/io.h"
|
||||
#include "lib/file/vfs/vfs_path.h"
|
||||
#include "lib/os_path.h"
|
||||
#include "lib/path.h"
|
||||
#include "lib/status.h"
|
||||
|
||||
#include <cstdint>
|
||||
#include <iterator>
|
||||
#include <string>
|
||||
|
||||
|
||||
@@ -27,9 +27,7 @@
|
||||
#ifndef INCLUDED_FILE_STATS
|
||||
#define INCLUDED_FILE_STATS
|
||||
|
||||
#include "lib/code_annotation.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
#include "lib/posix/posix_types.h"
|
||||
|
||||
#define FILE_STATS_ENABLED 0
|
||||
|
||||
|
||||
@@ -31,10 +31,12 @@
|
||||
#include "lib/code_annotation.h"
|
||||
#include "lib/debug.h"
|
||||
#include "lib/file/common/file_stats.h"
|
||||
#include "lib/posix/posix_filesystem.h"
|
||||
#include "lib/posix/posix_types.h"
|
||||
#include "lib/sysdep/filesystem.h"
|
||||
|
||||
#include <cerrno>
|
||||
#include <fcntl.h>
|
||||
|
||||
static const StatusDefinition fileStatusDefinitions[] = {
|
||||
{ ERR::FILE_ACCESS, L"Insufficient access rights to open file", EACCES },
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2022 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
@@ -28,7 +28,9 @@
|
||||
#define INCLUDED_FILE
|
||||
|
||||
#include "lib/os_path.h"
|
||||
#include "lib/sysdep/filesystem.h" // O_*, S_*
|
||||
#include "lib/status.h"
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace ERR
|
||||
{
|
||||
|
||||
@@ -28,12 +28,18 @@
|
||||
|
||||
#include "lib/debug.h"
|
||||
#include "lib/file/file_system.h"
|
||||
|
||||
#include "lib/posix/posix_filesystem.h"
|
||||
#include "lib/sysdep/filesystem.h"
|
||||
#include "lib/sysdep/os.h"
|
||||
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <boost/version.hpp>
|
||||
#include <cerrno>
|
||||
#include <cstring>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
struct WDIR;
|
||||
|
||||
bool DirectoryExists(const OsPath& path)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2022 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
@@ -28,7 +28,11 @@
|
||||
#define INCLUDED_FILE_SYSTEM
|
||||
|
||||
#include "lib/os_path.h"
|
||||
#include "lib/posix/posix_filesystem.h" // mode_t
|
||||
#include "lib/path.h"
|
||||
#include "lib/posix/posix_filesystem.h"
|
||||
#include "lib/posix/posix_types.h"
|
||||
#include "lib/status.h"
|
||||
#include "lib/types.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
|
||||
@@ -36,6 +36,8 @@
|
||||
#include "lib/lib.h"
|
||||
#include "lib/os_path.h"
|
||||
#include "lib/posix/posix_aio.h" // LIO_READ, LIO_WRITE
|
||||
#include "lib/posix/posix_types.h"
|
||||
#include "lib/status.h"
|
||||
#include "lib/sysdep/filesystem.h" // wtruncate
|
||||
#include "lib/sysdep/os.h"
|
||||
#include "lib/sysdep/rtl.h"
|
||||
@@ -44,6 +46,7 @@
|
||||
#include <algorithm>
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <fcntl.h>
|
||||
#include <memory>
|
||||
|
||||
namespace ERR
|
||||
|
||||
@@ -24,8 +24,9 @@
|
||||
#define INCLUDED_WRITE_BUFFER
|
||||
|
||||
#include "lib/code_annotation.h"
|
||||
#include "lib/debug.h"
|
||||
#include "lib/file/file.h"
|
||||
#include "lib/posix/posix_types.h"
|
||||
#include "lib/status.h"
|
||||
#include "lib/types.h"
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2021 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
@@ -22,11 +22,15 @@
|
||||
|
||||
#include "lib/self_test.h"
|
||||
|
||||
#include "lib/file/file_system.h"
|
||||
#include "lib/file/vfs/vfs.h"
|
||||
#include "lib/file/vfs/vfs_populate.h"
|
||||
#include "lib/os_path.h"
|
||||
#include "lib/path.h"
|
||||
#include "lib/types.h"
|
||||
|
||||
#include <utility>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <tuple>
|
||||
|
||||
static OsPath TEST_FOLDER(DataDir()/"_test.temp");
|
||||
|
||||
|
||||
@@ -22,10 +22,17 @@
|
||||
|
||||
#include "lib/self_test.h"
|
||||
|
||||
#include "lib/code_annotation.h"
|
||||
#include "lib/file/common/file_loader.h"
|
||||
#include "lib/file/vfs/vfs.h"
|
||||
#include "lib/file/vfs/vfs_lookup.h"
|
||||
#include "lib/file/vfs/vfs_path.h"
|
||||
#include "lib/file/vfs/vfs_tree.h"
|
||||
#include "lib/os_path.h"
|
||||
#include "lib/status.h"
|
||||
#include "lib/types.h"
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
class MockLoader : public IFileLoader
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2021 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
@@ -22,9 +22,15 @@
|
||||
|
||||
#include "lib/self_test.h"
|
||||
|
||||
#include "lib/file/vfs/vfs_util.h"
|
||||
#include "lib/file/file_system.h"
|
||||
#include "lib/file/vfs/vfs.h"
|
||||
#include "lib/file/vfs/vfs_path.h"
|
||||
#include "lib/file/vfs/vfs_util.h"
|
||||
#include "lib/os_path.h"
|
||||
#include "lib/path.h"
|
||||
#include "lib/types.h"
|
||||
|
||||
#include <memory>
|
||||
|
||||
static OsPath MOD_PATH(DataDir() / "mods" / "_test.vfs" / "");
|
||||
static OsPath CACHE_PATH(DataDir() / "_testcache" / "");
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
#include "lib/file/vfs/vfs_tree.h"
|
||||
#include "lib/os_path.h"
|
||||
#include "lib/path.h"
|
||||
#include "lib/posix/posix_filesystem.h"
|
||||
#include "lib/posix/posix_types.h"
|
||||
#include "lib/sysdep/filesystem.h"
|
||||
|
||||
|
||||
@@ -27,8 +27,8 @@
|
||||
#ifndef INCLUDED_VFS_LOOKUP
|
||||
#define INCLUDED_VFS_LOOKUP
|
||||
|
||||
#include "lib/debug.h"
|
||||
#include "lib/file/vfs/vfs_path.h"
|
||||
#include "lib/status.h"
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2010 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
@@ -28,6 +28,7 @@
|
||||
#define INCLUDED_VFS_POPULATE
|
||||
|
||||
#include "lib/file/common/real_directory.h"
|
||||
#include "lib/status.h"
|
||||
|
||||
class VfsDirectory;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2024 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
@@ -29,11 +29,13 @@
|
||||
|
||||
#include <map>
|
||||
|
||||
#include "lib/file/file_system.h" // CFileInfo
|
||||
#include "lib/file/common/file_loader.h" // PIFileLoader
|
||||
#include "lib/file/common/real_directory.h" // PRealDirectory
|
||||
#include "lib/file/vfs/vfs_path.h"
|
||||
|
||||
#include <ctime>
|
||||
#include <string>
|
||||
|
||||
class VfsFile
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2015 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
@@ -27,8 +27,14 @@
|
||||
#ifndef INCLUDED_VFS_UTIL
|
||||
#define INCLUDED_VFS_UTIL
|
||||
|
||||
#include "lib/os_path.h"
|
||||
#include "lib/file/file_system.h"
|
||||
#include "lib/file/vfs/vfs.h"
|
||||
#include "lib/file/vfs/vfs_path.h"
|
||||
#include "lib/os_path.h"
|
||||
#include "lib/status.h"
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
|
||||
namespace vfs {
|
||||
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@
|
||||
#define INCLUDED_HASH
|
||||
|
||||
#include <cstddef>
|
||||
#include <memory>
|
||||
#include <functional>
|
||||
|
||||
/**
|
||||
* This function is the same as hash_combine, i.e. allows dropping the boost dependency just for this function.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2021 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
@@ -25,13 +25,16 @@
|
||||
*/
|
||||
|
||||
#include "precompiled.h"
|
||||
|
||||
#include "input.h"
|
||||
|
||||
#include "lib/debug.h"
|
||||
#include "lib/external_libraries/libsdl.h"
|
||||
#include "lib/status.h"
|
||||
|
||||
#include <SDL_events.h>
|
||||
#include <cstddef>
|
||||
#include <list>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
const size_t MAX_HANDLERS = 10;
|
||||
static InHandler handler_stack[MAX_HANDLERS];
|
||||
|
||||
+3
-2
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2017 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
@@ -27,9 +27,10 @@
|
||||
#ifndef INCLUDED_INPUT
|
||||
#define INCLUDED_INPUT
|
||||
|
||||
|
||||
#include "lib/external_libraries/libsdl_fwd.h"
|
||||
|
||||
struct SDL_Event_;
|
||||
|
||||
// input handler return values.
|
||||
enum InReaction
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2010 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
@@ -23,7 +23,13 @@
|
||||
#ifndef INCLUDED_OS_PATH
|
||||
#define INCLUDED_OS_PATH
|
||||
|
||||
#include "lib/debug.h"
|
||||
#include "lib/path.h"
|
||||
#include "lib/sysdep/os.h"
|
||||
|
||||
#include <climits>
|
||||
#include <cstddef>
|
||||
#include <string>
|
||||
|
||||
// rationale:
|
||||
// users are responsible for ensuring the path doesn't contain any forbidden
|
||||
|
||||
+4
-1
@@ -44,8 +44,11 @@
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstring>
|
||||
#include <cwchar>
|
||||
#include <filesystem>
|
||||
#include <functional>
|
||||
#include <istream>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
|
||||
namespace ERR
|
||||
{
|
||||
|
||||
@@ -60,12 +60,13 @@ need only be renamed (e.g. _open, _stat).
|
||||
#ifndef INCLUDED_POSIX
|
||||
#define INCLUDED_POSIX
|
||||
|
||||
#include "lib/sysdep/compiler.h"
|
||||
#include "lib/sysdep/os.h"
|
||||
|
||||
#if OS_WIN
|
||||
# include "lib/sysdep/os/win/wposix/wposix.h"
|
||||
#endif
|
||||
|
||||
#include "lib/posix/posix_types.h"
|
||||
|
||||
// disabled to reduce dependencies. include them where needed.
|
||||
//#include "lib/posix/posix_aio.h"
|
||||
//#include "lib/posix/posix_dlfcn.h"
|
||||
|
||||
@@ -29,8 +29,11 @@
|
||||
|
||||
#include "lib/code_annotation.h"
|
||||
#include "lib/status.h"
|
||||
#include "lib/sysdep/compiler.h"
|
||||
#include "lib/sysdep/os.h"
|
||||
|
||||
#include <cstdarg>
|
||||
#include <cstddef>
|
||||
|
||||
namespace ERR
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2024 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
@@ -23,11 +23,14 @@
|
||||
#ifndef INCLUDED_SELF_TEST
|
||||
#define INCLUDED_SELF_TEST
|
||||
|
||||
// for convenience, to avoid having to include all of these manually
|
||||
#include "lib/lib.h"
|
||||
#include "lib/os_path.h"
|
||||
#include "lib/status.h"
|
||||
#include "lib/posix/posix.h"
|
||||
#include "lib/self_test.h"
|
||||
|
||||
#include <cstddef>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#define CXXTEST_HAVE_EH
|
||||
#define CXXTEST_HAVE_STD
|
||||
|
||||
@@ -25,19 +25,29 @@
|
||||
*/
|
||||
|
||||
#include "precompiled.h"
|
||||
#include "lib/sysdep/smbios.h"
|
||||
|
||||
#include "lib/bits.h"
|
||||
#include "smbios.h"
|
||||
|
||||
#include "lib/alignment.h"
|
||||
#include "lib/byte_order.h" // FOURCC_BE
|
||||
#include "lib/bits.h"
|
||||
#include "lib/code_annotation.h"
|
||||
#include "lib/code_generation.h"
|
||||
#include "lib/debug.h"
|
||||
#include "lib/module_init.h"
|
||||
#include "lib/posix/posix.h"
|
||||
#include "lib/status.h"
|
||||
#include "lib/sysdep/os.h"
|
||||
|
||||
#if OS_WIN
|
||||
# include "lib/sysdep/os/win/wutil.h"
|
||||
# include "lib/byte_order.h"
|
||||
# include "lib/sysdep/os/win/wfirmware.h"
|
||||
# include "lib/sysdep/os/win/wutil.h"
|
||||
#endif
|
||||
|
||||
#include <cinttypes>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
#include <sstream>
|
||||
#include <vector>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2010 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
@@ -24,6 +24,9 @@
|
||||
|
||||
#include "lib/sysdep/rtl.h"
|
||||
|
||||
#include <cstdint>
|
||||
#include <cstring>
|
||||
|
||||
class Test_rtl : public CxxTest::TestSuite
|
||||
{
|
||||
void _test_AllocateAligned_helper(size_t size, size_t align)
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#include "lib/alignment.h"
|
||||
#include "lib/posix/posix_mman.h" // PROT_*
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
|
||||
namespace vm {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2010 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "lib/self_test.h"
|
||||
|
||||
#include "lib/bits.h"
|
||||
#include "lib/types.h"
|
||||
|
||||
//#define EQUALS(actual, expected) ENSURE((actual) == (expected))
|
||||
#define EQUALS TS_ASSERT_EQUALS
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2020 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "lib/self_test.h"
|
||||
|
||||
#include "lib/byte_order.h"
|
||||
#include "lib/types.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2022 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
@@ -24,6 +24,8 @@
|
||||
|
||||
#include "lib/adts/cache_adt.h"
|
||||
|
||||
#include <cstddef>
|
||||
#include <queue>
|
||||
#include <random>
|
||||
|
||||
class TestCache: public CxxTest::TestSuite
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2012 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
@@ -22,8 +22,11 @@
|
||||
|
||||
#include "lib/self_test.h"
|
||||
|
||||
#include "lib/path.h"
|
||||
#include "lib/os_path.h"
|
||||
#include "lib/path.h"
|
||||
#include "lib/sysdep/os.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
class TestPath : public CxxTest::TestSuite
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2010 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
@@ -22,7 +22,11 @@
|
||||
|
||||
#include "lib/self_test.h"
|
||||
|
||||
#include "lib/debug.h"
|
||||
#include "lib/rand.h"
|
||||
#include "lib/status.h"
|
||||
|
||||
#include <cstdlib>
|
||||
|
||||
class TestRand : public CxxTest::TestSuite
|
||||
{
|
||||
|
||||
@@ -22,9 +22,15 @@
|
||||
|
||||
#include "lib/self_test.h"
|
||||
|
||||
#include "lib/debug.h"
|
||||
#include "lib/secure_crt.h"
|
||||
#include "lib/status.h"
|
||||
#include "lib/sysdep/os.h"
|
||||
|
||||
#include <cerrno>
|
||||
#include <cstdarg>
|
||||
#include <cstring>
|
||||
#include <cwchar>
|
||||
|
||||
// note: we only test the char version. this avoids having to
|
||||
// expose secure_crt.cpp's tchar / tcpy etc. macros in the header and/or
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2010 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
@@ -21,8 +21,14 @@
|
||||
*/
|
||||
|
||||
#include "lib/self_test.h"
|
||||
|
||||
#include "lib/code_annotation.h"
|
||||
#include "lib/status.h"
|
||||
#include "lib/utf8.h"
|
||||
|
||||
#include <cstddef>
|
||||
#include <string>
|
||||
|
||||
// (copied from CStr test)
|
||||
|
||||
class Test_wchar : public CxxTest::TestSuite
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2021 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
@@ -22,11 +22,12 @@
|
||||
|
||||
#include "lib/self_test.h"
|
||||
|
||||
#include "lib/tex/tex.h"
|
||||
#include "lib/tex/tex_codec.h"
|
||||
#include "lib/allocators/shared_ptr.h"
|
||||
#include "lib/tex/tex.h"
|
||||
#include "lib/types.h"
|
||||
|
||||
#include <cstring>
|
||||
#include <memory>
|
||||
|
||||
class TestTex : public CxxTest::TestSuite
|
||||
{
|
||||
|
||||
@@ -26,12 +26,26 @@
|
||||
|
||||
#include "precompiled.h"
|
||||
|
||||
#include "lib/byte_order.h"
|
||||
#include "lib/bits.h"
|
||||
#include "lib/timer.h"
|
||||
#include "lib/allocators/shared_ptr.h"
|
||||
#include "tex_codec.h"
|
||||
|
||||
#include "lib/alignment.h"
|
||||
#include "lib/allocators/shared_ptr.h"
|
||||
#include "lib/bits.h"
|
||||
#include "lib/byte_order.h"
|
||||
#include "lib/code_annotation.h"
|
||||
#include "lib/debug.h"
|
||||
#include "lib/lib.h"
|
||||
#include "lib/os_path.h"
|
||||
#include "lib/posix/posix_types.h"
|
||||
#include "lib/status.h"
|
||||
#include "lib/tex/tex.h"
|
||||
#include "lib/tex/tex_internal.h"
|
||||
#include "lib/timer.h"
|
||||
#include "lib/types.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstdlib>
|
||||
#include <memory>
|
||||
|
||||
// NOTE: the convention is bottom-up for DDS, but there's no way to tell.
|
||||
|
||||
|
||||
@@ -26,12 +26,26 @@
|
||||
|
||||
#include "precompiled.h"
|
||||
|
||||
#include "lib/external_libraries/png.h"
|
||||
|
||||
#include "lib/byte_order.h"
|
||||
#include "tex_codec.h"
|
||||
|
||||
#include "lib/alignment.h"
|
||||
#include "lib/allocators/dynarray.h"
|
||||
#include "lib/allocators/shared_ptr.h"
|
||||
#include "lib/byte_order.h"
|
||||
#include "lib/code_annotation.h"
|
||||
#include "lib/debug.h"
|
||||
#include "lib/external_libraries/png.h"
|
||||
#include "lib/os_path.h"
|
||||
#include "lib/status.h"
|
||||
#include "lib/sysdep/compiler.h"
|
||||
#include "lib/tex/tex.h"
|
||||
#include "lib/timer.h"
|
||||
#include "lib/types.h"
|
||||
|
||||
#include <csetjmp>
|
||||
#include <cstring>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#if MSC_VERSION
|
||||
|
||||
|
||||
@@ -26,9 +26,17 @@
|
||||
|
||||
#include "precompiled.h"
|
||||
|
||||
#include "lib/byte_order.h"
|
||||
#include "tex_codec.h"
|
||||
|
||||
#include "lib/bits.h"
|
||||
#include "lib/byte_order.h"
|
||||
#include "lib/code_annotation.h"
|
||||
#include "lib/os_path.h"
|
||||
#include "lib/status.h"
|
||||
#include "lib/tex/tex.h"
|
||||
#include "lib/types.h"
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
#pragma pack(push, 1)
|
||||
|
||||
|
||||
+8
-2
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2017 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
@@ -22,7 +22,13 @@
|
||||
|
||||
#include "precompiled.h"
|
||||
|
||||
#include "lib/utf8.h"
|
||||
#include "utf8.h"
|
||||
|
||||
#include "lib/code_annotation.h"
|
||||
#include "lib/debug.h"
|
||||
#include "lib/types.h"
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
static const StatusDefinition utf8StatusDefinitions[] = {
|
||||
{ ERR::UTF8_SURROGATE, L"UTF-16 surrogate pairs aren't supported" },
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#include "ps/CStr.h"
|
||||
|
||||
#include <array>
|
||||
#include <functional>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2024 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@@ -22,8 +22,9 @@
|
||||
#include "lib/timer.h"
|
||||
#include "lib/utf8.h"
|
||||
#include "lib/allocators/shared_ptr.h"
|
||||
#include "lib/file/file_system.h"
|
||||
#include "lib/external_libraries/libsdl.h"
|
||||
#include "lib/file/file_system.h"
|
||||
#include "lib/sysdep/filesystem.h"
|
||||
#include "network/NetClient.h"
|
||||
#include "network/NetServer.h"
|
||||
#include "ps/CLogger.h"
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "JSInterface_VFS.h"
|
||||
|
||||
#include "lib/file/vfs/vfs_util.h"
|
||||
#include "lib/sysdep/filesystem.h"
|
||||
#include "ps/CLogger.h"
|
||||
#include "ps/CStr.h"
|
||||
#include "ps/Filesystem.h"
|
||||
|
||||
@@ -21,8 +21,9 @@
|
||||
|
||||
#include "graphics/MapReader.h"
|
||||
#include "graphics/Terrain.h"
|
||||
#include "lib/timer.h"
|
||||
#include "lib/file/vfs/vfs_util.h"
|
||||
#include "lib/sysdep/filesystem.h"
|
||||
#include "lib/timer.h"
|
||||
#include "maths/MathUtil.h"
|
||||
#include "ps/CLogger.h"
|
||||
#include "ps/ConfigDB.h"
|
||||
|
||||
Reference in New Issue
Block a user