1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00

Style: Apply clang-tidy's readability-braces-around-statements

This commit is contained in:
Rémi Verschelde
2021-04-05 14:09:59 +02:00
parent 9bbe51dc27
commit d83761ba80
32 changed files with 308 additions and 165 deletions

View File

@@ -891,8 +891,9 @@ struct VariantIndexedSetGet_Array {
static void ptr_get(const void *base, int64_t index, void *member) {
/* avoid ptrconvert for performance*/
const Array &v = *reinterpret_cast<const Array *>(base);
if (index < 0)
if (index < 0) {
index += v.size();
}
OOB_TEST(index, v.size());
PtrToArg<Variant>::encode(v[index], member);
}
@@ -925,8 +926,9 @@ struct VariantIndexedSetGet_Array {
static void ptr_set(void *base, int64_t index, const void *member) {
/* avoid ptrconvert for performance*/
Array &v = *reinterpret_cast<Array *>(base);
if (index < 0)
if (index < 0) {
index += v.size();
}
OOB_TEST(index, v.size());
v.set(index, PtrToArg<Variant>::convert(member));
}