diff options
author | Jeroen Bakker <jeroen@blender.org> | 2022-01-28 18:18:13 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2022-01-28 18:18:13 +0300 |
commit | b6f640b9534289d2235f3bcb9689bcc5d58f721d (patch) | |
tree | 11e6aea47e61c429d2e57d7795a4839d7a3eb7a5 /source/blender/gpu/intern/gpu_shader_dependency.cc | |
parent | 3b2a1ff716a0b927731ca75d9538d6da54637b6b (diff) |
Cleanup: Clang-tidy warnings.
Silence Clang-tidy warnings in gpu module.
Diffstat (limited to 'source/blender/gpu/intern/gpu_shader_dependency.cc')
-rw-r--r-- | source/blender/gpu/intern/gpu_shader_dependency.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/gpu/intern/gpu_shader_dependency.cc b/source/blender/gpu/intern/gpu_shader_dependency.cc index 3965d796647..5e03f7d0767 100644 --- a/source/blender/gpu/intern/gpu_shader_dependency.cc +++ b/source/blender/gpu/intern/gpu_shader_dependency.cc @@ -119,7 +119,7 @@ struct GPUSource { template<bool check_whole_word = true, bool reversed = false, typename T> int64_t find_str(const StringRef &input, const T keyword, int64_t offset = 0) { - while (1) { + while (true) { if constexpr (reversed) { offset = input.rfind(keyword, offset); } @@ -202,10 +202,10 @@ struct GPUSource { * - All values needs to be specified using constant literals to avoid compiler differences. * - All values needs to have the 'u' suffix to avoid GLSL compiler errors. */ - void enum_preprocess(void) + void enum_preprocess() { const StringRefNull input = source; - std::string output = ""; + std::string output; int64_t cursor = 0; int64_t last_pos = 0; const bool is_cpp = filename.endswith(".hh"); @@ -220,7 +220,7 @@ struct GPUSource { continue; \ } - while (1) { + while (true) { cursor = find_keyword(input, "enum ", cursor); if (cursor == -1) { break; |