Skip to content

Commit

Permalink
Clang-format continuation indent fixes + .gitignore additions
Browse files Browse the repository at this point in the history
* Proper support for continuation indents in clang format
* make src/wieldmesh.h proper and remove it from whitelist
* Add CLion default build directories in .gitignore
  • Loading branch information
nerzhul committed Apr 6, 2017
1 parent 00138a5 commit be06636
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 13 deletions.
2 changes: 2 additions & 0 deletions .clang-format
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@ IncludeCategories:
Priority: 2 Priority: 2
- Regex: '^<.*' - Regex: '^<.*'
Priority: 1 Priority: 1
AlignAfterOpenBracket: DontAlign
ContinuationIndentWidth: 16
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ locale/
*.ninja *.ninja
.ninja* .ninja*
*.gch *.gch
cmake-build-debug/
cmake-build-release/


## Android build files ## Android build files
build/android/src/main/assets build/android/src/main/assets
Expand Down
20 changes: 8 additions & 12 deletions src/wieldmesh.h
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#ifndef WIELDMESH_HEADER #ifndef WIELDMESH_HEADER
#define WIELDMESH_HEADER #define WIELDMESH_HEADER


#include "irrlichttypes_extrabloated.h"
#include <string> #include <string>
#include "irrlichttypes_extrabloated.h"


struct ItemStack; struct ItemStack;
class Client; class Client;
Expand All @@ -31,30 +31,27 @@ struct TileSpec;
/* /*
Wield item scene node, renders the wield mesh of some item Wield item scene node, renders the wield mesh of some item
*/ */
class WieldMeshSceneNode: public scene::ISceneNode class WieldMeshSceneNode : public scene::ISceneNode
{ {
public: public:
WieldMeshSceneNode(scene::ISceneNode *parent, scene::ISceneManager *mgr, WieldMeshSceneNode(scene::ISceneNode *parent, scene::ISceneManager *mgr,
s32 id = -1, bool lighting = false); s32 id = -1, bool lighting = false);
virtual ~WieldMeshSceneNode(); virtual ~WieldMeshSceneNode();


void setCube(const TileSpec tiles[6], void setCube(const TileSpec tiles[6], v3f wield_scale, ITextureSource *tsrc);
v3f wield_scale, ITextureSource *tsrc); void setExtruded(const std::string &imagename, v3f wield_scale,
void setExtruded(const std::string &imagename, ITextureSource *tsrc, u8 num_frames);
v3f wield_scale, ITextureSource *tsrc, u8 num_frames);
void setItem(const ItemStack &item, Client *client); void setItem(const ItemStack &item, Client *client);


// Sets the vertex color of the wield mesh. // Sets the vertex color of the wield mesh.
// Must only be used if the constructor was called with lighting = false // Must only be used if the constructor was called with lighting = false
void setColor(video::SColor color); void setColor(video::SColor color);


scene::IMesh *getMesh() scene::IMesh *getMesh() { return m_meshnode->getMesh(); }
{ return m_meshnode->getMesh(); }


virtual void render(); virtual void render();


virtual const aabb3f &getBoundingBox() const virtual const aabb3f &getBoundingBox() const { return m_bounding_box; }
{ return m_bounding_box; }


private: private:
void changeToMesh(scene::IMesh *mesh); void changeToMesh(scene::IMesh *mesh);
Expand Down Expand Up @@ -84,6 +81,5 @@ class WieldMeshSceneNode: public scene::ISceneNode


scene::IMesh *getItemMesh(Client *client, const ItemStack &item); scene::IMesh *getItemMesh(Client *client, const ItemStack &item);


scene::IMesh *getExtrudedMesh(ITextureSource *tsrc, scene::IMesh *getExtrudedMesh(ITextureSource *tsrc, const std::string &imagename);
const std::string &imagename);
#endif #endif
1 change: 0 additions & 1 deletion util/travis/clang-format-whitelist.txt
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -438,4 +438,3 @@ src/voxelalgorithms.h
src/voxel.cpp src/voxel.cpp
src/voxel.h src/voxel.h
src/wieldmesh.cpp src/wieldmesh.cpp
src/wieldmesh.h

0 comments on commit be06636

Please sign in to comment.