diff options
author | Loïc Blot <nerzhul@users.noreply.github.com> | 2017-04-01 14:48:16 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-01 14:48:16 +0200 |
commit | 987eb2b7615104f3f70e56e51f1dd3df5b2a41eb (patch) | |
tree | 8bc37ba6257442f190248c38651db38c6c87cb6e /src | |
parent | 63ac62ec8abe30f0d6dd2cfe0ddaab291c36893f (diff) | |
download | minetest-987eb2b7615104f3f70e56e51f1dd3df5b2a41eb.tar.gz minetest-987eb2b7615104f3f70e56e51f1dd3df5b2a41eb.tar.bz2 minetest-987eb2b7615104f3f70e56e51f1dd3df5b2a41eb.zip |
Clang-format: trivial fix on some headers (#5495)
Fix some headers style and remove them from whitelist
Diffstat (limited to 'src')
-rw-r--r-- | src/client/keys.h | 6 | ||||
-rw-r--r-- | src/clientsimpleobject.h | 7 | ||||
-rw-r--r-- | src/content_abm.h | 1 | ||||
-rw-r--r-- | src/database-leveldb.h | 3 | ||||
-rw-r--r-- | src/database-redis.h | 3 | ||||
-rw-r--r-- | src/database-sqlite3.h | 7 | ||||
-rw-r--r-- | src/database.h | 3 | ||||
-rw-r--r-- | src/filecache.h | 10 | ||||
-rw-r--r-- | src/gettime.h | 5 | ||||
-rw-r--r-- | src/irr_aabb3d.h | 1 | ||||
-rw-r--r-- | src/irr_v2d.h | 1 | ||||
-rw-r--r-- | src/irr_v3d.h | 1 |
12 files changed, 18 insertions, 30 deletions
diff --git a/src/client/keys.h b/src/client/keys.h index 25f3e44d2..b446d3a1e 100644 --- a/src/client/keys.h +++ b/src/client/keys.h @@ -20,9 +20,10 @@ with this program; if not, write to the Free Software Foundation, Inc., #ifndef KEYS_HEADER #define KEYS_HEADER -#include<list> +#include <list> -class KeyType { +class KeyType +{ public: enum T { // Player movement @@ -83,5 +84,4 @@ public: typedef KeyType::T GameKeyType; - #endif diff --git a/src/clientsimpleobject.h b/src/clientsimpleobject.h index c94db22f1..f5b79b64f 100644 --- a/src/clientsimpleobject.h +++ b/src/clientsimpleobject.h @@ -29,10 +29,9 @@ protected: public: bool m_to_be_removed; - ClientSimpleObject(): m_to_be_removed(false) {} - virtual ~ClientSimpleObject(){} - virtual void step(float dtime){} + ClientSimpleObject() : m_to_be_removed(false) {} + virtual ~ClientSimpleObject() {} + virtual void step(float dtime) {} }; #endif - diff --git a/src/content_abm.h b/src/content_abm.h index 0a91a96a2..0fb3a0413 100644 --- a/src/content_abm.h +++ b/src/content_abm.h @@ -30,4 +30,3 @@ class INodeDefManager; void add_legacy_abms(ServerEnvironment *env, INodeDefManager *nodedef); #endif - diff --git a/src/database-leveldb.h b/src/database-leveldb.h index 3993db0c3..171946741 100644 --- a/src/database-leveldb.h +++ b/src/database-leveldb.h @@ -24,9 +24,9 @@ with this program; if not, write to the Free Software Foundation, Inc., #if USE_LEVELDB +#include <string> #include "database.h" #include "leveldb/db.h" -#include <string> class Database_LevelDB : public Database { @@ -46,4 +46,3 @@ private: #endif // USE_LEVELDB #endif - diff --git a/src/database-redis.h b/src/database-redis.h index 3addaa20a..214bc8dd6 100644 --- a/src/database-redis.h +++ b/src/database-redis.h @@ -24,9 +24,9 @@ with this program; if not, write to the Free Software Foundation, Inc., #if USE_REDIS -#include "database.h" #include <hiredis.h> #include <string> +#include "database.h" class Settings; @@ -52,4 +52,3 @@ private: #endif // USE_REDIS #endif - diff --git a/src/database-sqlite3.h b/src/database-sqlite3.h index debbc9d8b..2ab4c8ee9 100644 --- a/src/database-sqlite3.h +++ b/src/database-sqlite3.h @@ -20,11 +20,11 @@ with this program; if not, write to the Free Software Foundation, Inc., #ifndef DATABASE_SQLITE3_HEADER #define DATABASE_SQLITE3_HEADER -#include "database.h" #include <string> +#include "database.h" extern "C" { - #include "sqlite3.h" +#include "sqlite3.h" } class Database_SQLite3 : public Database @@ -50,7 +50,7 @@ private: // Open and initialize the database if needed void verifyDatabase(); - void bindPos(sqlite3_stmt *stmt, const v3s16 &pos, int index=1); + void bindPos(sqlite3_stmt *stmt, const v3s16 &pos, int index = 1); bool m_initialized; @@ -70,4 +70,3 @@ private: }; #endif - diff --git a/src/database.h b/src/database.h index 459789306..7213f088a 100644 --- a/src/database.h +++ b/src/database.h @@ -20,8 +20,8 @@ with this program; if not, write to the Free Software Foundation, Inc., #ifndef DATABASE_HEADER #define DATABASE_HEADER -#include <vector> #include <string> +#include <vector> #include "irr_v3d.h" #include "irrlichttypes.h" #include "util/basic_macros.h" @@ -47,4 +47,3 @@ public: }; #endif - diff --git a/src/filecache.h b/src/filecache.h index a913a06ac..f390f71b7 100644 --- a/src/filecache.h +++ b/src/filecache.h @@ -21,8 +21,8 @@ with this program; if not, write to the Free Software Foundation, Inc., #ifndef FILECACHE_HEADER #define FILECACHE_HEADER -#include <string> #include <iostream> +#include <string> class FileCache { @@ -30,13 +30,11 @@ public: /* 'dir' is the file cache directory to use. */ - FileCache(std::string dir): - m_dir(dir) - { - } - + FileCache(std::string dir) : m_dir(dir) {} + bool update(const std::string &name, const std::string &data); bool load(const std::string &name, std::ostream &os); + private: std::string m_dir; diff --git a/src/gettime.h b/src/gettime.h index 44c159026..6e70b8533 100644 --- a/src/gettime.h +++ b/src/gettime.h @@ -45,8 +45,8 @@ extern u32 getTime(TimePrecision prec); Timestamp stuff */ -#include <time.h> #include <string> +#include <time.h> inline std::string getTimestamp() { @@ -54,10 +54,9 @@ inline std::string getTimestamp() // This is not really thread-safe but it won't break anything // except its own output, so just go with it. struct tm *tm = localtime(&t); - char cs[20]; //YYYY-MM-DD HH:MM:SS + '\0' + char cs[20]; // YYYY-MM-DD HH:MM:SS + '\0' strftime(cs, 20, "%Y-%m-%d %H:%M:%S", tm); return cs; } - #endif diff --git a/src/irr_aabb3d.h b/src/irr_aabb3d.h index 7ac401837..4c6b3f5e6 100644 --- a/src/irr_aabb3d.h +++ b/src/irr_aabb3d.h @@ -27,4 +27,3 @@ with this program; if not, write to the Free Software Foundation, Inc., typedef core::aabbox3d<f32> aabb3f; #endif - diff --git a/src/irr_v2d.h b/src/irr_v2d.h index 5c0d65a30..617491cf0 100644 --- a/src/irr_v2d.h +++ b/src/irr_v2d.h @@ -31,4 +31,3 @@ typedef core::vector2d<u32> v2u32; typedef core::vector2d<f32> v2f32; #endif - diff --git a/src/irr_v3d.h b/src/irr_v3d.h index f74d601e8..fa6af3661 100644 --- a/src/irr_v3d.h +++ b/src/irr_v3d.h @@ -30,4 +30,3 @@ typedef core::vector3d<u16> v3u16; typedef core::vector3d<s32> v3s32; #endif - |