diff options
author | Campbell Barton <campbell@blender.org> | 2022-09-25 11:33:28 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-09-25 13:17:08 +0300 |
commit | f68cfd6bb078482c4a779a6e26a56e2734edb5b8 (patch) | |
tree | 2878e5b80dba5bdeba186d99661d604eb38879cd /source/blender/gpu/intern/gpu_shader_log.cc | |
parent | c7b247a118e302a3afc6473797e53b6af28b69e2 (diff) |
Cleanup: replace C-style casts with functional casts for numeric types
Diffstat (limited to 'source/blender/gpu/intern/gpu_shader_log.cc')
-rw-r--r-- | source/blender/gpu/intern/gpu_shader_log.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/gpu/intern/gpu_shader_log.cc b/source/blender/gpu/intern/gpu_shader_log.cc index dbc36c5afd0..e593c4fa508 100644 --- a/source/blender/gpu/intern/gpu_shader_log.cc +++ b/source/blender/gpu/intern/gpu_shader_log.cc @@ -93,10 +93,10 @@ void Shader::print_log(Span<const char *> sources, } /* Silence not useful lines. */ - StringRef logref = StringRefNull(log_line).substr(0, (size_t)line_end - (size_t)log_line); + StringRef logref = StringRefNull(log_line).substr(0, size_t(line_end) - size_t(log_line)); if (logref.endswith(" shader failed to compile with the following errors:") || logref.endswith(" No code generated")) { - log_line += (size_t)line_end - (size_t)log_line; + log_line += size_t(line_end) - size_t(log_line); continue; } @@ -291,7 +291,7 @@ bool GPULogParser::at_any(const char *log_line, const StringRef chars) const int GPULogParser::parse_number(const char *log_line, char **r_new_position) const { - return (int)strtol(log_line, r_new_position, 10); + return int(strtol(log_line, r_new_position, 10)); } /** \} */ |