aboutsummaryrefslogtreecommitdiff
path: root/src/script/lua_api
diff options
context:
space:
mode:
authorLoic Blot <loic.blot@unix-experience.fr>2017-04-07 23:22:00 +0200
committerLoic Blot <loic.blot@unix-experience.fr>2017-04-07 23:22:00 +0200
commit4af99b75cf3ae43c365a4c1e90e85f8ec764cf62 (patch)
treeb8366b07b950b3ef7e251457c9b2509175c0faad /src/script/lua_api
parent271d7c31e69db0bb6c5cf2cfb6e97ba129045d3e (diff)
downloadminetest-4af99b75cf3ae43c365a4c1e90e85f8ec764cf62.tar.gz
minetest-4af99b75cf3ae43c365a4c1e90e85f8ec764cf62.tar.bz2
minetest-4af99b75cf3ae43c365a4c1e90e85f8ec764cf62.zip
Pass clang-format on 14 trivial header files fixes
Also remove them from whitelist
Diffstat (limited to 'src/script/lua_api')
-rw-r--r--src/script/lua_api/l_areastore.h5
-rw-r--r--src/script/lua_api/l_metadata.h7
-rw-r--r--src/script/lua_api/l_minimap.h8
-rw-r--r--src/script/lua_api/l_nodetimer.h7
-rw-r--r--src/script/lua_api/l_noise.h27
-rw-r--r--src/script/lua_api/l_server.h4
-rw-r--r--src/script/lua_api/l_settings.h30
7 files changed, 44 insertions, 44 deletions
diff --git a/src/script/lua_api/l_areastore.h b/src/script/lua_api/l_areastore.h
index 4bd94cebe..7dea08df4 100644
--- a/src/script/lua_api/l_areastore.h
+++ b/src/script/lua_api/l_areastore.h
@@ -22,12 +22,11 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "lua_api/l_base.h"
-
class AreaStore;
-class LuaAreaStore : public ModApiBase {
+class LuaAreaStore : public ModApiBase
+{
private:
-
static const char className[];
static const luaL_reg methods[];
diff --git a/src/script/lua_api/l_metadata.h b/src/script/lua_api/l_metadata.h
index 561be6adf..be31d95ad 100644
--- a/src/script/lua_api/l_metadata.h
+++ b/src/script/lua_api/l_metadata.h
@@ -19,8 +19,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#ifndef L_METADATA_H_
#define L_METADATA_H_
-#include "lua_api/l_base.h"
#include "irrlichttypes_bloated.h"
+#include "lua_api/l_base.h"
class Metadata;
@@ -28,14 +28,15 @@ class Metadata;
NodeMetaRef
*/
-class MetaDataRef : public ModApiBase {
+class MetaDataRef : public ModApiBase
+{
public:
virtual ~MetaDataRef() {}
protected:
static MetaDataRef *checkobject(lua_State *L, int narg);
virtual void reportMetadataChange() {}
- virtual Metadata* getmeta(bool auto_create) = 0;
+ virtual Metadata *getmeta(bool auto_create) = 0;
virtual void clearMeta() = 0;
virtual void handleToTable(lua_State *L, Metadata *meta);
diff --git a/src/script/lua_api/l_minimap.h b/src/script/lua_api/l_minimap.h
index d9bb8842c..9a299b4fd 100644
--- a/src/script/lua_api/l_minimap.h
+++ b/src/script/lua_api/l_minimap.h
@@ -22,12 +22,11 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "l_base.h"
-
class Minimap;
-class LuaMinimap : public ModApiBase {
+class LuaMinimap : public ModApiBase
+{
private:
-
static const char className[];
static const luaL_reg methods[];
@@ -49,6 +48,7 @@ private:
static int l_toggle_shape(lua_State *L);
Minimap *m_minimap;
+
public:
LuaMinimap(Minimap *m);
~LuaMinimap() {}
@@ -56,7 +56,7 @@ public:
static void create(lua_State *L, Minimap *object);
static LuaMinimap *checkobject(lua_State *L, int narg);
- static Minimap* getobject(LuaMinimap *ref);
+ static Minimap *getobject(LuaMinimap *ref);
static void Register(lua_State *L);
};
diff --git a/src/script/lua_api/l_nodetimer.h b/src/script/lua_api/l_nodetimer.h
index 9f8dd21c8..239112037 100644
--- a/src/script/lua_api/l_nodetimer.h
+++ b/src/script/lua_api/l_nodetimer.h
@@ -20,12 +20,13 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#ifndef L_NODETIMER_H_
#define L_NODETIMER_H_
-#include "lua_api/l_base.h"
#include "irr_v3d.h"
+#include "lua_api/l_base.h"
class ServerEnvironment;
-class NodeTimerRef : public ModApiBase {
+class NodeTimerRef : public ModApiBase
+{
private:
v3s16 m_p;
ServerEnvironment *m_env;
@@ -62,6 +63,4 @@ public:
static void Register(lua_State *L);
};
-
-
#endif /* L_NODETIMER_H_ */
diff --git a/src/script/lua_api/l_noise.h b/src/script/lua_api/l_noise.h
index 40bfd1315..11ec348bf 100644
--- a/src/script/lua_api/l_noise.h
+++ b/src/script/lua_api/l_noise.h
@@ -20,14 +20,15 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#ifndef L_NOISE_H_
#define L_NOISE_H_
-#include "lua_api/l_base.h"
#include "irr_v3d.h"
+#include "lua_api/l_base.h"
#include "noise.h"
/*
LuaPerlinNoise
*/
-class LuaPerlinNoise : public ModApiBase {
+class LuaPerlinNoise : public ModApiBase
+{
private:
NoiseParams np;
static const char className[];
@@ -57,7 +58,8 @@ public:
/*
LuaPerlinNoiseMap
*/
-class LuaPerlinNoiseMap : public ModApiBase {
+class LuaPerlinNoiseMap : public ModApiBase
+{
NoiseParams np;
Noise *noise;
bool m_is3d;
@@ -95,7 +97,8 @@ public:
/*
LuaPseudoRandom
*/
-class LuaPseudoRandom : public ModApiBase {
+class LuaPseudoRandom : public ModApiBase
+{
private:
PseudoRandom m_pseudo;
@@ -111,8 +114,7 @@ private:
static int l_next(lua_State *L);
public:
- LuaPseudoRandom(s32 seed) :
- m_pseudo(seed) {}
+ LuaPseudoRandom(s32 seed) : m_pseudo(seed) {}
// LuaPseudoRandom(seed)
// Creates an LuaPseudoRandom and leaves it on top of stack
@@ -126,7 +128,8 @@ public:
/*
LuaPcgRandom
*/
-class LuaPcgRandom : public ModApiBase {
+class LuaPcgRandom : public ModApiBase
+{
private:
PcgRandom m_rnd;
@@ -146,10 +149,8 @@ private:
static int l_rand_normal_dist(lua_State *L);
public:
- LuaPcgRandom(u64 seed) :
- m_rnd(seed) {}
- LuaPcgRandom(u64 seed, u64 seq) :
- m_rnd(seed, seq) {}
+ LuaPcgRandom(u64 seed) : m_rnd(seed) {}
+ LuaPcgRandom(u64 seed, u64 seq) : m_rnd(seed, seq) {}
// LuaPcgRandom(seed)
// Creates an LuaPcgRandom and leaves it on top of stack
@@ -160,11 +161,11 @@ public:
static void Register(lua_State *L);
};
-
/*
LuaSecureRandom
*/
-class LuaSecureRandom : public ModApiBase {
+class LuaSecureRandom : public ModApiBase
+{
private:
static const size_t RAND_BUF_SIZE = 2048;
static const char className[];
diff --git a/src/script/lua_api/l_server.h b/src/script/lua_api/l_server.h
index 1ad46d440..ca5e7b80f 100644
--- a/src/script/lua_api/l_server.h
+++ b/src/script/lua_api/l_server.h
@@ -22,7 +22,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "lua_api/l_base.h"
-class ModApiServer : public ModApiBase {
+class ModApiServer : public ModApiBase
+{
private:
// request_shutdown([message], [reconnect])
static int l_request_shutdown(lua_State *L);
@@ -107,7 +108,6 @@ private:
public:
static void Initialize(lua_State *L, int top);
-
};
#endif /* L_SERVER_H_ */
diff --git a/src/script/lua_api/l_settings.h b/src/script/lua_api/l_settings.h
index bca333e31..d5edd32ce 100644
--- a/src/script/lua_api/l_settings.h
+++ b/src/script/lua_api/l_settings.h
@@ -24,51 +24,51 @@ with this program; if not, write to the Free Software Foundation, Inc.,
class Settings;
-class LuaSettings : public ModApiBase {
+class LuaSettings : public ModApiBase
+{
private:
static const char className[];
static const luaL_reg methods[];
// garbage collector
- static int gc_object(lua_State* L);
+ static int gc_object(lua_State *L);
// get(self, key) -> value
- static int l_get(lua_State* L);
+ static int l_get(lua_State *L);
// get_bool(self, key) -> boolean
- static int l_get_bool(lua_State* L);
+ static int l_get_bool(lua_State *L);
// set(self, key, value)
- static int l_set(lua_State* L);
+ static int l_set(lua_State *L);
// remove(self, key) -> success
- static int l_remove(lua_State* L);
+ static int l_remove(lua_State *L);
// get_names(self) -> {key1, ...}
- static int l_get_names(lua_State* L);
+ static int l_get_names(lua_State *L);
// write(self) -> success
- static int l_write(lua_State* L);
+ static int l_write(lua_State *L);
// to_table(self) -> {[key1]=value1,...}
- static int l_to_table(lua_State* L);
+ static int l_to_table(lua_State *L);
bool m_write_allowed;
- Settings* m_settings;
+ Settings *m_settings;
std::string m_filename;
public:
- LuaSettings(const char* filename, bool write_allowed);
+ LuaSettings(const char *filename, bool write_allowed);
~LuaSettings();
// LuaSettings(filename)
// Creates an LuaSettings and leaves it on top of stack
- static int create_object(lua_State* L);
+ static int create_object(lua_State *L);
- static LuaSettings* checkobject(lua_State* L, int narg);
-
- static void Register(lua_State* L);
+ static LuaSettings *checkobject(lua_State *L, int narg);
+ static void Register(lua_State *L);
};
#endif