mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Reduce number of recursively included headers
This should improve compilation speed. Things changed: * Prefer forward-declarations in headers. * Move header-includes out of headers if possible. * Move some functions definitions out of headers. * Put some member variables into unique_ptrs (see Client).
This commit is contained in:
parent
e9e8eed360
commit
8b73743baa
35 changed files with 109 additions and 56 deletions
|
@ -23,6 +23,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
#include "client/client.h"
|
||||
#include "common/c_converter.h"
|
||||
#include "common/c_content.h"
|
||||
#include "lua_api/l_item.h"
|
||||
#include "itemdef.h"
|
||||
#include "s_item.h"
|
||||
|
||||
void ScriptApiClient::on_mods_loaded()
|
||||
|
|
|
@ -20,19 +20,19 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "util/pointedthing.h"
|
||||
#include "cpp_api/s_base.h"
|
||||
#include "mapnode.h"
|
||||
#include "itemdef.h"
|
||||
#include "util/string.h"
|
||||
#include "util/pointedthing.h"
|
||||
#include "lua_api/l_item.h"
|
||||
|
||||
#ifdef _CRT_MSVCP_CURRENT
|
||||
#include <cstdint>
|
||||
#endif
|
||||
|
||||
class ClientEnvironment;
|
||||
struct ItemStack;
|
||||
class Inventory;
|
||||
struct ItemDefinition;
|
||||
|
||||
class ScriptApiClient : virtual public ScriptApiBase
|
||||
{
|
||||
|
|
|
@ -19,6 +19,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
|
||||
#include "s_modchannels.h"
|
||||
#include "s_internal.h"
|
||||
#include "modchannels.h"
|
||||
|
||||
void ScriptApiModChannels::on_modchannel_message(const std::string &channel,
|
||||
const std::string &sender, const std::string &message)
|
||||
|
|
|
@ -20,7 +20,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
#pragma once
|
||||
|
||||
#include "cpp_api/s_base.h"
|
||||
#include "modchannels.h"
|
||||
|
||||
enum ModChannelSignal : u8;
|
||||
|
||||
class ScriptApiModChannels : virtual public ScriptApiBase
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue