Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused headers in core #100564

Merged
merged 1 commit into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion core/config/engine.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
#include "core/os/main_loop.h"
#include "core/string/ustring.h"
#include "core/templates/list.h"
#include "core/templates/vector.h"

template <typename T>
class TypedArray;
Expand Down
1 change: 0 additions & 1 deletion core/config/project_settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
#include "core/io/marshalls.h"
#include "core/io/resource_uid.h"
#include "core/object/script_language.h"
#include "core/os/keyboard.h"
#include "core/templates/rb_set.h"
#include "core/variant/typed_array.h"
#include "core/variant/variant_parser.h"
Expand Down
2 changes: 0 additions & 2 deletions core/core_bind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@
#include "core/crypto/crypto_core.h"
#include "core/debugger/engine_debugger.h"
#include "core/debugger/script_debugger.h"
#include "core/io/file_access_compressed.h"
#include "core/io/file_access_encrypted.h"
#include "core/io/marshalls.h"
#include "core/math/geometry_2d.h"
#include "core/math/geometry_3d.h"
Expand Down
2 changes: 0 additions & 2 deletions core/core_bind.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@
#include "core/debugger/engine_profiler.h"
#include "core/io/resource_loader.h"
#include "core/io/resource_saver.h"
#include "core/object/script_language.h"
#include "core/os/os.h"
#include "core/os/semaphore.h"
#include "core/os/thread.h"
#include "core/templates/safe_refcount.h"
Expand Down
1 change: 0 additions & 1 deletion core/core_constants.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
#include "core/input/input_event.h"
#include "core/object/class_db.h"
#include "core/os/keyboard.h"
#include "core/templates/hash_set.h"
#include "core/variant/variant.h"

struct _CoreConstant {
Expand Down
2 changes: 1 addition & 1 deletion core/core_constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#define CORE_CONSTANTS_H

#include "core/string/string_name.h"
#include "core/templates/hash_set.h"
#include "core/templates/hash_map.h"

class CoreConstants {
public:
Expand Down
4 changes: 0 additions & 4 deletions core/crypto/crypto.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@

#include "crypto.h"

#include "core/config/engine.h"
#include "core/io/certs_compressed.gen.h"
#include "core/io/compression.h"

/// Resources

CryptoKey *(*CryptoKey::_create)(bool p_notify_postinitialize) = nullptr;
Expand Down
1 change: 0 additions & 1 deletion core/debugger/engine_debugger.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
#include "core/templates/hash_map.h"
#include "core/templates/vector.h"
#include "core/variant/array.h"
#include "core/variant/variant.h"

class RemoteDebuggerPeer;
class ScriptDebugger;
Expand Down
1 change: 0 additions & 1 deletion core/debugger/script_debugger.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
#include "core/object/script_language.h"
#include "core/string/string_name.h"
#include "core/templates/hash_set.h"
#include "core/templates/rb_map.h"
#include "core/templates/vector.h"

class ScriptDebugger {
Expand Down
1 change: 0 additions & 1 deletion core/input/shortcut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
/**************************************************************************/

#include "shortcut.h"
#include "core/os/keyboard.h"

void Shortcut::set_events(const Array &p_events) {
for (int i = 0; i < p_events.size(); i++) {
Expand Down
1 change: 0 additions & 1 deletion core/io/config_file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
#include "config_file.h"

#include "core/io/file_access_encrypted.h"
#include "core/os/keyboard.h"
#include "core/string/string_builder.h"
#include "core/variant/variant_parser.h"

Expand Down
3 changes: 0 additions & 3 deletions core/io/dtls_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@

#include "dtls_server.h"

#include "core/config/project_settings.h"
#include "core/io/file_access.h"

DTLSServer *(*DTLSServer::_create)(bool p_notify_postinitialize) = nullptr;
bool DTLSServer::available = false;

Expand Down
2 changes: 0 additions & 2 deletions core/io/file_access_compressed.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@

#include "file_access_compressed.h"

#include "core/string/print_string.h"

void FileAccessCompressed::configure(const String &p_magic, Compression::Mode p_mode, uint32_t p_block_size) {
magic = p_magic.ascii().get_data();
magic = (magic + " ").substr(0, 4);
Expand Down
3 changes: 0 additions & 3 deletions core/io/file_access_encrypted.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,8 @@
#include "file_access_encrypted.h"

#include "core/crypto/crypto_core.h"
#include "core/string/print_string.h"
#include "core/variant/variant.h"

#include <stdio.h>

Error FileAccessEncrypted::open_and_parse(Ref<FileAccess> p_base, const Vector<uint8_t> &p_key, Mode p_mode, bool p_with_magic, const Vector<uint8_t> &p_iv) {
ERR_FAIL_COND_V_MSG(file.is_valid(), ERR_ALREADY_IN_USE, vformat("Can't open file while another file from path '%s' is open.", file->get_path_absolute()));
ERR_FAIL_COND_V(p_key.size() != 32, ERR_INVALID_PARAMETER);
Expand Down
2 changes: 0 additions & 2 deletions core/io/file_access_memory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@
#include "file_access_memory.h"

#include "core/config/project_settings.h"
#include "core/io/dir_access.h"
#include "core/templates/rb_map.h"

static HashMap<String, Vector<uint8_t>> *files = nullptr;

Expand Down
2 changes: 0 additions & 2 deletions core/io/file_access_pack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@
#include "core/os/os.h"
#include "core/version.h"

#include <stdio.h>

Error PackedData::add_pack(const String &p_path, bool p_replace_files, uint64_t p_offset) {
for (int i = 0; i < sources.size(); i++) {
if (sources[i]->try_open_pack(p_path, p_replace_files, p_offset)) {
Expand Down
1 change: 0 additions & 1 deletion core/io/file_access_pack.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
#include "core/string/print_string.h"
#include "core/templates/hash_set.h"
#include "core/templates/list.h"
#include "core/templates/rb_map.h"

// Godot's packed file magic header ("GDPC" in ASCII).
#define PACK_HEADER_MAGIC 0x43504447
Expand Down
3 changes: 0 additions & 3 deletions core/io/file_access_zip.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,9 @@
#ifdef MINIZIP_ENABLED

#include "core/io/file_access_pack.h"
#include "core/templates/rb_map.h"

#include "thirdparty/minizip/unzip.h"

#include <stdlib.h>

class ZipArchive : public PackSource {
public:
struct File {
Expand Down
2 changes: 0 additions & 2 deletions core/io/image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,9 @@
#include "core/io/image_loader.h"
#include "core/io/resource_loader.h"
#include "core/math/math_funcs.h"
#include "core/string/print_string.h"
#include "core/templates/hash_map.h"
#include "core/variant/dictionary.h"

#include <stdio.h>
#include <cmath>

const char *Image::format_names[Image::FORMAT_MAX] = {
Expand Down
1 change: 0 additions & 1 deletion core/io/image.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@

#include "core/io/resource.h"
#include "core/math/color.h"
#include "core/math/rect2.h"

/**
* Image storage class. This is used to store an image in user memory, as well as
Expand Down
2 changes: 0 additions & 2 deletions core/io/image_loader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@

#include "image_loader.h"

#include "core/string/print_string.h"

void ImageFormatLoader::_bind_methods() {
BIND_BITFIELD_FLAG(FLAG_NONE);
BIND_BITFIELD_FLAG(FLAG_FORCE_LINEAR);
Expand Down
1 change: 0 additions & 1 deletion core/io/ip_address.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ IPAddress::operator Variant() const {
return operator String();
}*/

#include <stdio.h>
#include <string.h>

IPAddress::operator String() const {
Expand Down
3 changes: 0 additions & 3 deletions core/io/logger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,9 @@

#include "logger.h"

#include "core/config/project_settings.h"
#include "core/core_globals.h"
#include "core/io/dir_access.h"
#include "core/os/os.h"
#include "core/os/time.h"
#include "core/string/print_string.h"

#include "modules/modules_enabled.gen.h" // For regex.

Expand Down
2 changes: 0 additions & 2 deletions core/io/packet_peer_dtls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@
/**************************************************************************/

#include "packet_peer_dtls.h"
#include "core/config/project_settings.h"
#include "core/io/file_access.h"

PacketPeerDTLS *(*PacketPeerDTLS::_create)(bool p_notify_postinitialize) = nullptr;
bool PacketPeerDTLS::available = false;
Expand Down
3 changes: 3 additions & 0 deletions core/io/plist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@

#include "plist.h"

#include "core/crypto/crypto_core.h"
#include "core/os/time.h"

PList::PLNodeType PListNode::get_type() const {
return data_type;
}
Expand Down
2 changes: 0 additions & 2 deletions core/io/plist.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@

// Property list file format (application/x-plist) parser, property list ASN-1 serialization.

#include "core/crypto/crypto_core.h"
#include "core/io/file_access.h"
#include "core/os/time.h"

class PListNode;

Expand Down
1 change: 0 additions & 1 deletion core/io/remote_filesystem_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
#ifndef REMOTE_FILESYSTEM_CLIENT_H
#define REMOTE_FILESYSTEM_CLIENT_H

#include "core/io/ip_address.h"
#include "core/string/ustring.h"
#include "core/templates/hash_set.h"
#include "core/templates/local_vector.h"
Expand Down
4 changes: 0 additions & 4 deletions core/io/resource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,11 @@

#include "resource.h"

#include "core/io/file_access.h"
#include "core/io/resource_loader.h"
#include "core/math/math_funcs.h"
#include "core/object/script_language.h"
#include "core/os/os.h"
#include "scene/main/node.h" //only so casting works

#include <stdio.h>

void Resource::emit_changed() {
if (ResourceLoader::is_within_load() && !Thread::is_main_thread()) {
ResourceLoader::resource_changed_emit(this);
Expand Down
2 changes: 0 additions & 2 deletions core/io/resource_format_binary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@
#include "core/config/project_settings.h"
#include "core/io/dir_access.h"
#include "core/io/file_access_compressed.h"
#include "core/io/image.h"
#include "core/io/marshalls.h"
#include "core/io/missing_resource.h"
#include "core/object/script_language.h"
#include "core/version.h"
Expand Down
1 change: 0 additions & 1 deletion core/io/resource_loader.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
#include "core/io/resource.h"
#include "core/object/gdvirtual.gen.inc"
#include "core/object/worker_thread_pool.h"
#include "core/os/semaphore.h"
#include "core/os/thread.h"

class ConditionVariable;
Expand Down
2 changes: 1 addition & 1 deletion core/io/xml_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

#include "xml_parser.h"

#include "core/string/print_string.h"
#include "core/io/file_access.h"

//#define DEBUG_XML

Expand Down
1 change: 0 additions & 1 deletion core/io/xml_parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
#ifndef XML_PARSER_H
#define XML_PARSER_H

#include "core/io/file_access.h"
#include "core/object/ref_counted.h"
#include "core/string/ustring.h"
#include "core/templates/vector.h"
Expand Down
1 change: 0 additions & 1 deletion core/math/a_star.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
#include "a_star.compat.inc"

#include "core/math/geometry_3d.h"
#include "core/object/script_language.h"

int64_t AStar3D::get_available_point_id() const {
if (points.has(last_free_id)) {
Expand Down
1 change: 0 additions & 1 deletion core/math/a_star_grid_2d.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@

#include "core/object/gdvirtual.gen.inc"
#include "core/object/ref_counted.h"
#include "core/templates/list.h"
#include "core/templates/local_vector.h"

class AStarGrid2D : public RefCounted {
Expand Down
3 changes: 0 additions & 3 deletions core/math/convex_hull.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,9 @@ subject to the following restrictions:
#include "core/error/error_macros.h"
#include "core/math/aabb.h"
#include "core/math/math_defs.h"
#include "core/os/memory.h"
#include "core/templates/oa_hash_map.h"
#include "core/templates/paged_allocator.h"

#include <string.h>

//#define DEBUG_CONVEX_HULL
//#define SHOW_ITERATIONS

Expand Down
2 changes: 0 additions & 2 deletions core/math/geometry_3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@

#include "geometry_3d.h"

#include "thirdparty/misc/polypartition.h"

void Geometry3D::get_closest_points_between_segments(const Vector3 &p_p0, const Vector3 &p_p1, const Vector3 &p_q0, const Vector3 &p_q1, Vector3 &r_ps, Vector3 &r_qt) {
// Based on David Eberly's Computation of Distance Between Line Segments algorithm.

Expand Down
2 changes: 0 additions & 2 deletions core/math/quick_hull.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@

#include "quick_hull.h"

#include "core/templates/rb_map.h"

uint32_t QuickHull::debug_stop_after = 0xFFFFFFFF;

Error QuickHull::build(const Vector<Vector3> &p_points, Geometry3D::MeshData &r_mesh) {
Expand Down
2 changes: 0 additions & 2 deletions core/math/quick_hull.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@
#ifndef QUICK_HULL_H
#define QUICK_HULL_H

#include "core/math/aabb.h"
#include "core/math/geometry_3d.h"
#include "core/templates/hash_set.h"
#include "core/templates/list.h"

class QuickHull {
Expand Down
1 change: 0 additions & 1 deletion core/math/transform_3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@

#include "transform_3d.h"

#include "core/math/math_funcs.h"
#include "core/string/ustring.h"

void Transform3D::affine_invert() {
Expand Down
2 changes: 0 additions & 2 deletions core/object/callable_method_pointer.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
#define CALLABLE_METHOD_POINTER_H

#include "core/object/object.h"
#include "core/templates/hashfuncs.h"
#include "core/templates/simple_type.h"
#include "core/variant/binder_common.h"
#include "core/variant/callable.h"

Expand Down
1 change: 0 additions & 1 deletion core/object/class_db.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
#include "core/config/engine.h"
#include "core/io/resource_loader.h"
#include "core/object/script_language.h"
#include "core/os/mutex.h"
#include "core/version.h"

#define OBJTYPE_RLOCK RWLockRead _rw_lockr_(lock);
Expand Down
1 change: 0 additions & 1 deletion core/object/object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
#include "core/os/os.h"
#include "core/string/print_string.h"
#include "core/string/translation_server.h"
#include "core/templates/local_vector.h"
#include "core/variant/typed_array.h"

#ifdef DEBUG_ENABLED
Expand Down
2 changes: 0 additions & 2 deletions core/object/script_language.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@
#include "core/debugger/script_debugger.h"
#include "core/io/resource_loader.h"

#include <stdint.h>

ScriptLanguage *ScriptServer::_languages[MAX_LANGUAGES];
int ScriptServer::_language_count = 0;
bool ScriptServer::languages_ready = false;
Expand Down
Loading
Loading