From 0be6d925dc3c6413bce7a3ccb49631b8e4a6e67a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Thu, 14 May 2020 13:23:58 +0200 Subject: 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. --- servers/rendering/rendering_device_binds.cpp | 5 ----- 1 file changed, 5 deletions(-) (limited to 'servers/rendering/rendering_device_binds.cpp') diff --git a/servers/rendering/rendering_device_binds.cpp b/servers/rendering/rendering_device_binds.cpp index 91076a538e..2936843a9c 100644 --- a/servers/rendering/rendering_device_binds.cpp +++ b/servers/rendering/rendering_device_binds.cpp @@ -31,7 +31,6 @@ #include "rendering_device_binds.h" Error RDShaderFile::parse_versions_from_text(const String &p_text, const String p_defines, OpenIncludeFunction p_include_func, void *p_include_func_userdata) { - Vector lines = p_text.split("\n"); bool reading_versions = false; @@ -103,7 +102,6 @@ Error RDShaderFile::parse_versions_from_text(const String &p_text, const String if (reading_versions) { String l = line.strip_edges(); if (l != "") { - int eqpos = l.find("="); if (eqpos == -1) { base_error = "Version syntax is version=\"\"."; @@ -149,7 +147,6 @@ Error RDShaderFile::parse_versions_from_text(const String &p_text, const String base_error = "#include used, but no include function provided."; } } else { - stage_code[stage] += line + "\n"; } } @@ -160,7 +157,6 @@ Error RDShaderFile::parse_versions_from_text(const String &p_text, const String shader_file.instance(); if (base_error == "") { - if (stage_found[RD::SHADER_STAGE_COMPUTE] && stages_found > 1) { ERR_FAIL_V_MSG(ERR_PARSE_ERROR, "When writing compute shaders, [compute] mustbe the only stage present."); } @@ -174,7 +170,6 @@ Error RDShaderFile::parse_versions_from_text(const String &p_text, const String /* STEP 2, Compile the versions, add to shader file */ for (Map::Element *E = version_texts.front(); E; E = E->next()) { - Ref bytecode; bytecode.instance(); -- cgit v1.2.3