diff options
| author | Rémi Verschelde | 2017-03-05 16:44:50 +0100 |
|---|---|---|
| committer | Rémi Verschelde | 2017-03-05 16:44:50 +0100 |
| commit | 5dbf1809c6e3e905b94b8764e99491e608122261 (patch) | |
| tree | 5e5a5360db15d86d59ec8c6e4f7eb511388c5a9a /scene/resources/mesh_library.h | |
| parent | 45438e9918d421b244bfd7776a30e67dc7f2d3e3 (diff) | |
| download | godot-5dbf180.tar.gz godot-5dbf180.tar.zst godot-5dbf180.zip | |
A Whole New World (clang-format edition)
I can show you the code
Pretty, with proper whitespace
Tell me, coder, now when did
You last write readable code?
I can open your eyes
Make you see your bad indent
Force you to respect the style
The core devs agreed upon
A whole new world
A new fantastic code format
A de facto standard
With some sugar
Enforced with clang-format
A whole new world
A dazzling style we all dreamed of
And when we read it through
It's crystal clear
That now we're in a whole new world of code
Diffstat (limited to 'scene/resources/mesh_library.h')
| -rw-r--r-- | scene/resources/mesh_library.h | 32 |
1 files changed, 15 insertions, 17 deletions
diff --git a/scene/resources/mesh_library.h b/scene/resources/mesh_library.h index bb8012d3f..5f4a695c5 100644 --- a/scene/resources/mesh_library.h +++ b/scene/resources/mesh_library.h @@ -29,15 +29,15 @@ #ifndef GRID_THEME_H #define GRID_THEME_H -#include "resource.h" -#include "mesh.h" -#include "shape.h" #include "map.h" +#include "mesh.h" +#include "resource.h" #include "scene/3d/navigation_mesh.h" +#include "shape.h" class MeshLibrary : public Resource { - GDCLASS(MeshLibrary,Resource); + GDCLASS(MeshLibrary, Resource); RES_BASE_EXTENSION("gt"); struct Item { @@ -48,24 +48,22 @@ class MeshLibrary : public Resource { Ref<NavigationMesh> navmesh; }; - Map<int,Item> item_map; + Map<int, Item> item_map; protected: - - bool _set(const StringName& p_name, const Variant& p_value); - bool _get(const StringName& p_name,Variant &r_ret) const; - void _get_property_list( List<PropertyInfo> *p_list) const; + bool _set(const StringName &p_name, const Variant &p_value); + bool _get(const StringName &p_name, Variant &r_ret) const; + void _get_property_list(List<PropertyInfo> *p_list) const; static void _bind_methods(); -public: - +public: void create_item(int p_item); - void set_item_name(int p_item,const String& p_name); - void set_item_mesh(int p_item,const Ref<Mesh>& p_mesh); - void set_item_navmesh(int p_item, const Ref<NavigationMesh>& p_navmesh); - void set_item_shape(int p_item,const Ref<Shape>& p_shape); - void set_item_preview(int p_item,const Ref<Texture>& p_preview); + void set_item_name(int p_item, const String &p_name); + void set_item_mesh(int p_item, const Ref<Mesh> &p_mesh); + void set_item_navmesh(int p_item, const Ref<NavigationMesh> &p_navmesh); + void set_item_shape(int p_item, const Ref<Shape> &p_shape); + void set_item_preview(int p_item, const Ref<Texture> &p_preview); String get_item_name(int p_item) const; Ref<Mesh> get_item_mesh(int p_item) const; Ref<NavigationMesh> get_item_navmesh(int p_item) const; @@ -77,7 +75,7 @@ public: void clear(); - int find_item_name(const String& p_name) const; + int find_item_name(const String &p_name) const; Vector<int> get_item_list() const; int get_last_unused_item_id() const; |
