Files
ViewDesignEngine/docs/feedback/VDE-030.md
T
茂之钳 93ca49cb4f
CI / Build & Test (push) Failing after 16m56s
CI / Release Build (push) Failing after 30s
Build & Test / build-and-test (push) Has been cancelled
Build & Test / python-bindings (push) Has been cancelled
fix: VDE-028~030 compile warnings — close all ViewDesign feedback issues
VDE-028 (step_export.cpp):
  - Remove unused
  - Fix 4x misleading-indentation in write_bspline_surface loops

VDE-029 (class_a_surfacing.cpp):
  - Initialize Vector3D move = Vector3D::Zero() (2 occurrences)

VDE-030 (industrial_formats.cpp):
  - Remove unused brep_version read, fix pos_ offset
  - Fix misleading-indentation: split one-liner if-statements

All 30 VDE issues now resolved (30/30).
2026-07-28 21:24:27 +08:00

893 B

id, status, severity, category, date, reporter
id status severity category date reporter
VDE-030 fixed low code-quality 2026-07-28 ViewDesign

VDE-030: industrial_formats.cpp 误导缩进 + 未使用变量

描述

在 ViewDesign MSVC 构建中,vde_foundationindustrial_formats.cpp 产生编译警告:

  1. -Wunused-variable:行 189 uint32_t brep_version = read_u32_le(p + pos_); 变量未使用

  2. -Wmisleading-indentation:行 1585 if (v0 < 0) v0 = 0; if (v1 < 0) v1 = 0; 两个 if 在同一行

复现步骤

cmake --build build --config Release --target vde_foundation

影响

  • 仅影响代码整洁度

修复建议

  1. 未使用变量:删除 brep_version,或添加 (void)brep_version;
  2. 误导缩进:拆分为两行带大括号
if (v0 < 0) { v0 = 0; }
if (v1 < 0) { v1 = 0; }

相关文件

  • src/foundation/industrial_formats.cpp:189,1585