1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-06 12:20:30 +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

@@ -122,8 +122,9 @@ static const uint8_t base64DecodeTable[128] = {
uint8_t DecodeBase64(char ch) {
const auto idx = static_cast<uint8_t>(ch);
if (idx > 127)
if (idx > 127) {
return 255;
}
return base64DecodeTable[idx];
}
@@ -211,8 +212,9 @@ std::string EncodeBase64(const char *data, size_t length) {
EncodeByteBlock(&finalBytes[0], encoded_string, iEncodedByte);
// add '=' at the end
for (size_t i = 0; i < 4 * extraBytes / 3; i++)
for (size_t i = 0; i < 4 * extraBytes / 3; i++) {
encoded_string[encodedBytes - i - 1] = '=';
}
}
return encoded_string;
}