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 /tools/asset_packer.cc | |
| 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 'tools/asset_packer.cc')
| -rw-r--r-- | tools/asset_packer.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/asset_packer.cc b/tools/asset_packer.cc index fdecb58..7e186b6 100644 --- a/tools/asset_packer.cc +++ b/tools/asset_packer.cc @@ -307,12 +307,12 @@ static bool ProcessMeshFile(const std::string& full_path, buffer->resize(sizeof(uint32_t) + final_vertices.size() * sizeof(Vertex) + sizeof(uint32_t) + final_indices.size() * sizeof(uint32_t)); uint8_t* out_ptr = buffer->data(); - *reinterpret_cast<uint32_t*>(out_ptr) = (uint32_t)final_vertices.size(); + *(uint32_t*)(out_ptr) = (uint32_t)final_vertices.size(); out_ptr += sizeof(uint32_t); std::memcpy(out_ptr, final_vertices.data(), final_vertices.size() * sizeof(Vertex)); out_ptr += final_vertices.size() * sizeof(Vertex); - *reinterpret_cast<uint32_t*>(out_ptr) = (uint32_t)final_indices.size(); + *(uint32_t*)(out_ptr) = (uint32_t)final_indices.size(); out_ptr += sizeof(uint32_t); std::memcpy(out_ptr, final_indices.data(), final_indices.size() * sizeof(uint32_t)); @@ -337,7 +337,7 @@ static bool ProcessImageFile(const std::string& full_path, // Format: [Width(4)][Height(4)][Pixels...] buffer->resize(sizeof(uint32_t) * 2 + w * h * 4); - uint32_t* header = reinterpret_cast<uint32_t*>(buffer->data()); + uint32_t* header = (uint32_t*)(buffer->data()); header[0] = (uint32_t)w; header[1] = (uint32_t)h; std::memcpy(buffer->data() + sizeof(uint32_t) * 2, img_data, w * h * 4); |
