mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
C++ modernize: Pragma once (#6264)
* Migrate cpp headers to pragma once
This commit is contained in:
parent
c738d1eeab
commit
921151d97a
236 changed files with 288 additions and 1028 deletions
|
@ -17,8 +17,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#ifndef CPP_API_ASYNC_EVENTS_HEADER
|
||||
#define CPP_API_ASYNC_EVENTS_HEADER
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <deque>
|
||||
|
@ -156,5 +155,3 @@ private:
|
|||
// Counter semaphore for job dispatching
|
||||
Semaphore jobQueueCounter;
|
||||
};
|
||||
|
||||
#endif // CPP_API_ASYNC_EVENTS_HEADER
|
||||
|
|
|
@ -17,8 +17,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#ifndef S_BASE_H_
|
||||
#define S_BASE_H_
|
||||
#pragma once
|
||||
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
@ -147,5 +146,3 @@ private:
|
|||
GUIEngine *m_guiengine = nullptr;
|
||||
ScriptingType m_type;
|
||||
};
|
||||
|
||||
#endif /* S_BASE_H_ */
|
||||
|
|
|
@ -18,8 +18,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#ifndef S_CLIENT_H_
|
||||
#define S_CLIENT_H_
|
||||
#pragma once
|
||||
|
||||
#include "util/pointedthing.h"
|
||||
#include "cpp_api/s_base.h"
|
||||
|
@ -60,4 +59,3 @@ public:
|
|||
|
||||
void setEnv(ClientEnvironment *env);
|
||||
};
|
||||
#endif
|
||||
|
|
|
@ -17,8 +17,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#ifndef S_ENTITY_H_
|
||||
#define S_ENTITY_H_
|
||||
#pragma once
|
||||
|
||||
#include "cpp_api/s_base.h"
|
||||
#include "irr_v3d.h"
|
||||
|
@ -45,7 +44,3 @@ public:
|
|||
void luaentity_Rightclick(u16 id,
|
||||
ServerActiveObject *clicker);
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif /* S_ENTITY_H_ */
|
||||
|
|
|
@ -17,8 +17,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#ifndef S_ENV_H_
|
||||
#define S_ENV_H_
|
||||
#pragma once
|
||||
|
||||
#include "cpp_api/s_base.h"
|
||||
#include "irr_v3d.h"
|
||||
|
@ -44,5 +43,3 @@ public:
|
|||
|
||||
void initializeEnvironment(ServerEnvironment *env);
|
||||
};
|
||||
|
||||
#endif /* S_ENV_H_ */
|
||||
|
|
|
@ -24,8 +24,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
/******************************************************************************/
|
||||
/******************************************************************************/
|
||||
|
||||
#ifndef S_INTERNAL_H_
|
||||
#define S_INTERNAL_H_
|
||||
#pragma once
|
||||
|
||||
#include <thread>
|
||||
#include "common/c_internal.h"
|
||||
|
@ -84,6 +83,3 @@ private:
|
|||
lua_State *L = getStack(); \
|
||||
assert(lua_checkstack(L, 20)); \
|
||||
StackUnroller stack_unroller(L);
|
||||
|
||||
#endif /* S_INTERNAL_H_ */
|
||||
|
||||
|
|
|
@ -17,8 +17,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#ifndef S_INVENTORY_H_
|
||||
#define S_INVENTORY_H_
|
||||
#pragma once
|
||||
|
||||
#include "cpp_api/s_base.h"
|
||||
|
||||
|
@ -65,7 +64,3 @@ private:
|
|||
bool getDetachedInventoryCallback(
|
||||
const std::string &name, const char *callbackname);
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif /* S_INVENTORY_H_ */
|
||||
|
|
|
@ -17,8 +17,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#ifndef S_ITEM_H_
|
||||
#define S_ITEM_H_
|
||||
#pragma once
|
||||
|
||||
#include "cpp_api/s_base.h"
|
||||
#include "irr_v3d.h"
|
||||
|
@ -58,6 +57,3 @@ protected:
|
|||
void pushPointedThing(const PointedThing& pointed);
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif /* S_ITEM_H_ */
|
||||
|
|
|
@ -17,8 +17,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#ifndef S_MAINMENU_H_
|
||||
#define S_MAINMENU_H_
|
||||
#pragma once
|
||||
|
||||
#include "cpp_api/s_base.h"
|
||||
#include "util/string.h"
|
||||
|
@ -44,5 +43,3 @@ public:
|
|||
*/
|
||||
void handleMainMenuButtons(const StringMap &fields);
|
||||
};
|
||||
|
||||
#endif /* S_MAINMENU_H_ */
|
||||
|
|
|
@ -17,8 +17,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#ifndef S_NODE_H_
|
||||
#define S_NODE_H_
|
||||
#pragma once
|
||||
|
||||
#include "irr_v3d.h"
|
||||
#include "cpp_api/s_base.h"
|
||||
|
@ -58,7 +57,3 @@ public:
|
|||
static struct EnumString es_LiquidType[];
|
||||
static struct EnumString es_NodeBoxType[];
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif /* S_NODE_H_ */
|
||||
|
|
|
@ -17,8 +17,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#ifndef S_NODEMETA_H_
|
||||
#define S_NODEMETA_H_
|
||||
#pragma once
|
||||
|
||||
#include "cpp_api/s_base.h"
|
||||
#include "cpp_api/s_item.h"
|
||||
|
@ -63,5 +62,3 @@ public:
|
|||
private:
|
||||
|
||||
};
|
||||
|
||||
#endif /* S_NODEMETA_H_ */
|
||||
|
|
|
@ -17,8 +17,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#ifndef S_PLAYER_H_
|
||||
#define S_PLAYER_H_
|
||||
#pragma once
|
||||
|
||||
#include "cpp_api/s_base.h"
|
||||
#include "irr_v3d.h"
|
||||
|
@ -46,5 +45,3 @@ public:
|
|||
void on_playerReceiveFields(ServerActiveObject *player,
|
||||
const std::string &formname, const StringMap &fields);
|
||||
};
|
||||
|
||||
#endif /* S_PLAYER_H_ */
|
||||
|
|
|
@ -17,8 +17,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#ifndef S_SECURITY_H
|
||||
#define S_SECURITY_H
|
||||
#pragma once
|
||||
|
||||
#include "cpp_api/s_base.h"
|
||||
|
||||
|
@ -75,6 +74,3 @@ private:
|
|||
static int sl_os_rename(lua_State *L);
|
||||
static int sl_os_remove(lua_State *L);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -17,8 +17,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#ifndef S_SERVER_H_
|
||||
#define S_SERVER_H_
|
||||
#pragma once
|
||||
|
||||
#include "cpp_api/s_base.h"
|
||||
#include <set>
|
||||
|
@ -46,7 +45,3 @@ private:
|
|||
void getAuthHandler();
|
||||
void readPrivileges(int index, std::set<std::string> &result);
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif /* S_SERVER_H_ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue