Style: Harmonize header includes in modules

This applies our existing style guide, and adds a new rule to that style
guide for modular components such as platform ports and modules:

Includes from the platform port or module ("local" includes) should be listed
first in their own block using relative paths, before Godot's "core" includes
which use "absolute" (project folder relative) paths, and finally thirdparty
includes.

Includes in `#ifdef`s come after their relevant section, i.e. the overall
structure is:

- Local includes
  * Conditional local includes
- Core includes
  * Conditional core includes
- Thirdparty includes
  * Conditional thirdparty includes
This commit is contained in:
Rémi Verschelde
2023-06-13 16:56:21 +02:00
parent 7734146060
commit 25b2f1780a
217 changed files with 572 additions and 415 deletions

View File

@@ -31,10 +31,10 @@
#ifndef ENET_CONNECTION_H
#define ENET_CONNECTION_H
#include "core/object/ref_counted.h"
#include "enet_packet_peer.h"
#include "core/crypto/crypto.h"
#include "enet_packet_peer.h"
#include "core/object/ref_counted.h"
#include <enet/enet.h>

View File

@@ -29,6 +29,7 @@
/**************************************************************************/
#include "enet_multiplayer_peer.h"
#include "core/io/ip.h"
#include "core/io/marshalls.h"
#include "core/os/os.h"

View File

@@ -31,10 +31,11 @@
#ifndef ENET_MULTIPLAYER_PEER_H
#define ENET_MULTIPLAYER_PEER_H
#include "enet_connection.h"
#include "core/crypto/crypto.h"
#include "scene/main/multiplayer_peer.h"
#include "enet_connection.h"
#include <enet/enet.h>
class ENetMultiplayerPeer : public MultiplayerPeer {

View File

@@ -29,11 +29,13 @@
/**************************************************************************/
#include "register_types.h"
#include "core/error/error_macros.h"
#include "enet_connection.h"
#include "enet_multiplayer_peer.h"
#include "enet_packet_peer.h"
#include "core/error/error_macros.h"
static bool enet_ok = false;
void initialize_enet_module(ModuleInitializationLevel p_level) {