summaryrefslogtreecommitdiff
path: root/core/variant.h
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2020-05-14 13:23:58 +0200
committerRémi Verschelde <rverschelde@gmail.com>2020-05-14 16:54:55 +0200
commit0be6d925dc3c6413bce7a3ccb49631b8e4a6e67a (patch)
treea27e497da7104dd0a64f98a04fa3067668735e91 /core/variant.h
parent710b34b70227becdc652b4ae027fe0ac47409642 (diff)
Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks
Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
Diffstat (limited to 'core/variant.h')
-rw-r--r--core/variant.h6
1 files changed, 0 insertions, 6 deletions
diff --git a/core/variant.h b/core/variant.h
index 0498e93825..70de8479e3 100644
--- a/core/variant.h
+++ b/core/variant.h
@@ -126,7 +126,6 @@ private:
Type type = NIL;
struct ObjData {
-
ObjectID id;
Object *obj;
};
@@ -403,7 +402,6 @@ public:
static String get_operator_name(Operator p_op);
static void evaluate(const Operator &p_op, const Variant &p_a, const Variant &p_b, Variant &r_ret, bool &r_valid);
static _FORCE_INLINE_ Variant evaluate(const Operator &p_op, const Variant &p_a, const Variant &p_b) {
-
bool valid = true;
Variant res;
evaluate(p_op, p_a, p_b, res, valid);
@@ -489,22 +487,18 @@ Vector<Variant> varray(const Variant &p_arg1, const Variant &p_arg2, const Varia
Vector<Variant> varray(const Variant &p_arg1, const Variant &p_arg2, const Variant &p_arg3, const Variant &p_arg4, const Variant &p_arg5);
struct VariantHasher {
-
static _FORCE_INLINE_ uint32_t hash(const Variant &p_variant) { return p_variant.hash(); }
};
struct VariantComparator {
-
static _FORCE_INLINE_ bool compare(const Variant &p_lhs, const Variant &p_rhs) { return p_lhs.hash_compare(p_rhs); }
};
Variant::ObjData &Variant::_get_obj() {
-
return *reinterpret_cast<ObjData *>(&_data._mem[0]);
}
const Variant::ObjData &Variant::_get_obj() const {
-
return *reinterpret_cast<const ObjData *>(&_data._mem[0]);
}