From 001939ca8e2c582650d3cd77d0cd0eabffc50ed2 Mon Sep 17 00:00:00 2001 From: skal Date: Tue, 17 Feb 2026 08:57:55 +0100 Subject: 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 --- src/util/asset_manager.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/util') diff --git a/src/util/asset_manager.cc b/src/util/asset_manager.cc index 0baa063..a606b46 100644 --- a/src/util/asset_manager.cc +++ b/src/util/asset_manager.cc @@ -112,7 +112,7 @@ const uint8_t* GetAsset(AssetId asset_id, size_t* out_size) { CHECK_RETURN_END // Write header - uint32_t* header = reinterpret_cast(generated_data); + uint32_t* header = (uint32_t*)(generated_data); header[0] = (uint32_t)width; header[1] = (uint32_t)height; @@ -155,7 +155,7 @@ TextureAsset GetTextureAsset(AssetId asset_id) { return {0, 0, nullptr}; } - const uint32_t* header = reinterpret_cast(data); + const uint32_t* header = (const uint32_t*)(data); return {(int)header[0], (int)header[1], data + 8}; } @@ -167,13 +167,13 @@ MeshAsset GetMeshAsset(AssetId asset_id) { } const uint8_t* ptr = data; - uint32_t num_vertices = *reinterpret_cast(ptr); + uint32_t num_vertices = *(const uint32_t*)(ptr); ptr += sizeof(uint32_t); - const MeshVertex* vertices = reinterpret_cast(ptr); + const MeshVertex* vertices = (const MeshVertex*)(ptr); ptr += num_vertices * sizeof(MeshVertex); - uint32_t num_indices = *reinterpret_cast(ptr); + uint32_t num_indices = *(const uint32_t*)(ptr); ptr += sizeof(uint32_t); - const uint32_t* indices = reinterpret_cast(ptr); + const uint32_t* indices = (const uint32_t*)(ptr); return {num_vertices, vertices, num_indices, indices}; } -- cgit v1.2.3