diff options
author | Loïc Blot <loic.blot@unix-experience.fr> | 2017-04-18 17:13:50 +0200 |
---|---|---|
committer | Loïc Blot <loic.blot@unix-experience.fr> | 2017-04-18 17:13:50 +0200 |
commit | 5f2af7c4e80da1c646e5a19ceed5bd0871b56e85 (patch) | |
tree | d4c592b952c2875251924226be8710ac568a26d9 | |
parent | 93c1d511e3880acf15a656f1653ce5853dd1d362 (diff) | |
download | minetest-5f2af7c4e80da1c646e5a19ceed5bd0871b56e85.tar.gz minetest-5f2af7c4e80da1c646e5a19ceed5bd0871b56e85.tar.bz2 minetest-5f2af7c4e80da1c646e5a19ceed5bd0871b56e85.zip |
Fix broken lint since 04cc9de8f2fbcb11f133c88f02fc11504b3ea6f3
-rw-r--r-- | src/mesh_generator_thread.h | 22 | ||||
-rw-r--r-- | util/travis/clang-format-whitelist.txt | 1 |
2 files changed, 12 insertions, 11 deletions
diff --git a/src/mesh_generator_thread.h b/src/mesh_generator_thread.h index e74861862..6edb6906d 100644 --- a/src/mesh_generator_thread.h +++ b/src/mesh_generator_thread.h @@ -53,10 +53,12 @@ struct QueuedMeshUpdate */ class MeshUpdateQueue { - enum UpdateMode { + enum UpdateMode + { FORCE_UPDATE, SKIP_UPDATE_IF_ALREADY_CACHED, }; + public: MeshUpdateQueue(Client *client); @@ -68,7 +70,7 @@ public: // Returned pointer must be deleted // Returns NULL if queue is empty - QueuedMeshUpdate * pop(); + QueuedMeshUpdate *pop(); u32 size() { @@ -78,9 +80,9 @@ public: private: Client *m_client; - std::vector<QueuedMeshUpdate*> m_queue; + std::vector<QueuedMeshUpdate *> m_queue; std::set<v3s16> m_urgents; - std::map<v3s16, CachedMapBlockData*> m_cache; + std::map<v3s16, CachedMapBlockData *> m_cache; Mutex m_mutex; // TODO: Add callback to update these when g_settings changes @@ -89,9 +91,9 @@ private: bool m_cache_smooth_lighting; int m_meshgen_block_cache_size; - CachedMapBlockData* cacheBlock(Map *map, v3s16 p, UpdateMode mode, - size_t *cache_hit_counter=NULL); - CachedMapBlockData* getCachedBlock(const v3s16 &p); + CachedMapBlockData *cacheBlock(Map *map, v3s16 p, UpdateMode mode, + size_t *cache_hit_counter = NULL); + CachedMapBlockData *getCachedBlock(const v3s16 &p); void fillDataFromMapBlockCache(QueuedMeshUpdate *q); void cleanupCache(); }; @@ -102,10 +104,8 @@ struct MeshUpdateResult MapBlockMesh *mesh; bool ack_block_to_server; - MeshUpdateResult(): - p(-1338,-1338,-1338), - mesh(NULL), - ack_block_to_server(false) + MeshUpdateResult() + : p(-1338, -1338, -1338), mesh(NULL), ack_block_to_server(false) { } }; diff --git a/util/travis/clang-format-whitelist.txt b/util/travis/clang-format-whitelist.txt index acb6d51e4..42ce6d781 100644 --- a/util/travis/clang-format-whitelist.txt +++ b/util/travis/clang-format-whitelist.txt @@ -169,6 +169,7 @@ src/map_settings_manager.cpp src/map_settings_manager.h src/mesh.cpp src/mesh.h +src/mesh_generator_thread.cpp src/metadata.cpp src/metadata.h src/mg_biome.cpp |