aboutsummaryrefslogtreecommitdiff
path: root/core/path_db.h
diff options
context:
space:
mode:
authorRémi Verschelde2017-03-05 16:44:50 +0100
committerRémi Verschelde2017-03-05 16:44:50 +0100
commit5dbf1809c6e3e905b94b8764e99491e608122261 (patch)
tree5e5a5360db15d86d59ec8c6e4f7eb511388c5a9a /core/path_db.h
parent45438e9918d421b244bfd7776a30e67dc7f2d3e3 (diff)
downloadgodot-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 'core/path_db.h')
-rw-r--r--core/path_db.h25
1 files changed, 11 insertions, 14 deletions
diff --git a/core/path_db.h b/core/path_db.h
index db756c342..eec29676e 100644
--- a/core/path_db.h
+++ b/core/path_db.h
@@ -29,15 +29,12 @@
#ifndef PATH_DB_H
#define PATH_DB_H
-
-#include "ustring.h"
#include "string_db.h"
+#include "ustring.h"
/**
@author Juan Linietsky <reduzio@gmail.com>
*/
-
-
class NodePath {
struct Data {
@@ -51,11 +48,11 @@ class NodePath {
Data *data;
void unref();
-public:
+public:
_FORCE_INLINE_ StringName get_sname() const {
- if (data && data->path.size()==1 && data->subpath.empty() && !data->property) {
+ if (data && data->path.size() == 1 && data->subpath.empty() && !data->property) {
return data->path[0];
} else {
return operator String();
@@ -70,7 +67,7 @@ public:
Vector<StringName> get_names() const;
Vector<StringName> get_subnames() const;
- NodePath rel_path_to(const NodePath& p_np) const;
+ NodePath rel_path_to(const NodePath &p_np) const;
void prepend_period();
@@ -83,17 +80,17 @@ public:
operator String() const;
bool is_empty() const;
- bool operator==(const NodePath& p_path) const;
- bool operator!=(const NodePath& p_path) const;
- void operator=(const NodePath& p_path);
+ bool operator==(const NodePath &p_path) const;
+ bool operator!=(const NodePath &p_path) const;
+ void operator=(const NodePath &p_path);
void simplify();
NodePath simplified() const;
- NodePath(const Vector<StringName>& p_path,bool p_absolute,const String& p_property="");
- NodePath(const Vector<StringName>& p_path,const Vector<StringName>& p_subpath,bool p_absolute,const String& p_property="");
- NodePath(const NodePath& p_path);
- NodePath(const String& p_path);
+ NodePath(const Vector<StringName> &p_path, bool p_absolute, const String &p_property = "");
+ NodePath(const Vector<StringName> &p_path, const Vector<StringName> &p_subpath, bool p_absolute, const String &p_property = "");
+ NodePath(const NodePath &p_path);
+ NodePath(const String &p_path);
NodePath();
~NodePath();
};