diff options
| author | skal <pascal.massimino@gmail.com> | 2026-02-17 08:57:55 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-02-17 08:57:55 +0100 |
| commit | 001939ca8e2c582650d3cd77d0cd0eabffc50ed2 (patch) | |
| tree | 7363271308b3e53c2495f1973a62ae42ab10cd37 /src/tests | |
| parent | 59b7ca9adff07f8d457fba53ba4d67c293229b68 (diff) | |
style: replace C++ casts with C-style casts
Converts all static_cast<>, reinterpret_cast<> to C-style casts
per CODING_STYLE.md guidelines.
- Modified 12 files across gpu, 3d, util, tests, and tools
- All builds passing, 34/34 tests passing
- No functional changes, pure style cleanup
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Diffstat (limited to 'src/tests')
| -rw-r--r-- | src/tests/common/effect_test_helpers.cc | 6 | ||||
| -rw-r--r-- | src/tests/common/offscreen_render_target.cc | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/tests/common/effect_test_helpers.cc b/src/tests/common/effect_test_helpers.cc index 430b90f..2a40f60 100644 --- a/src/tests/common/effect_test_helpers.cc +++ b/src/tests/common/effect_test_helpers.cc @@ -45,9 +45,9 @@ bool all_pixels_match_color(const std::vector<uint8_t>& pixels, int width, const uint8_t g = pixels[offset + 1]; const uint8_t r = pixels[offset + 2]; - const int diff_r = static_cast<int>(r) - static_cast<int>(target_r); - const int diff_g = static_cast<int>(g) - static_cast<int>(target_g); - const int diff_b = static_cast<int>(b) - static_cast<int>(target_b); + const int diff_r = (int)(r) - (int)(target_r); + const int diff_g = (int)(g) - (int)(target_g); + const int diff_b = (int)(b) - (int)(target_b); if (diff_r * diff_r + diff_g * diff_g + diff_b * diff_b > tolerance * tolerance) { diff --git a/src/tests/common/offscreen_render_target.cc b/src/tests/common/offscreen_render_target.cc index 33f0ae0..2b0a43b 100644 --- a/src/tests/common/offscreen_render_target.cc +++ b/src/tests/common/offscreen_render_target.cc @@ -20,7 +20,7 @@ OffscreenRenderTarget::OffscreenRenderTarget(WGPUInstance instance, .usage = WGPUTextureUsage_RenderAttachment | WGPUTextureUsage_CopySrc | WGPUTextureUsage_TextureBinding, .dimension = WGPUTextureDimension_2D, - .size = {static_cast<uint32_t>(width), static_cast<uint32_t>(height), 1}, + .size = {(uint32_t)(width), (uint32_t)(height), 1}, .format = format, .mipLevelCount = 1, .sampleCount = 1, @@ -44,7 +44,7 @@ OffscreenRenderTarget::~OffscreenRenderTarget() { void OffscreenRenderTarget::map_callback(WGPUMapAsyncStatus status, void* userdata) { - MapState* state = static_cast<MapState*>(userdata); + MapState* state = (MapState*)(userdata); state->status = status; state->done = true; } |
