From a989f799fb0ec8c952804f3f6d0cc824745e2900 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8C=82=E4=B9=8B=E9=92=B3?= Date: Fri, 24 Jul 2026 07:39:25 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20format=5Futils=20rename=20fmt=E2=86=92fo?= =?UTF-8?q?rmat=5Ffn,=20iges=5Fimport=20insert=5For=5Fassign?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/vde/foundation/format_utils.h | 4 ++-- src/brep/iges_import.cpp | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/vde/foundation/format_utils.h b/include/vde/foundation/format_utils.h index 4d5996e..712f2f2 100644 --- a/include/vde/foundation/format_utils.h +++ b/include/vde/foundation/format_utils.h @@ -35,8 +35,8 @@ inline std::string fmt_iges_real(double v) { /// Format a Point3D as comma-separated reals inline std::string fmt_point(const core::Point3D& p, bool use_d = false) { - auto fmt = use_d ? fmt_iges_real : fmt_double; - return fmt(p.x()) + "," + fmt(p.y()) + "," + fmt(p.z()); + auto format_fn = use_d ? fmt_iges_real : fmt_double; + return format_fn(p.x()) + "," + fmt(p.y()) + "," + fmt(p.z()); } /// Pad a string to exactly 72 characters with spaces diff --git a/src/brep/iges_import.cpp b/src/brep/iges_import.cpp index 8f096d2..e1324a2 100644 --- a/src/brep/iges_import.cpp +++ b/src/brep/iges_import.cpp @@ -582,7 +582,7 @@ private: if (!ent) { // Return default line auto nc = curves::NurbsCurve({Point3D(0,0,0), Point3D(1,0,0)}, {0,0,1,1}, {1,1}, 1); - curve_cache_[de_index] = nc; + curve_cache_.insert_or_assign(de_index, nc); return nc; } @@ -600,7 +600,7 @@ private: } catch (const std::exception&) { // Keep default line on error } - curve_cache_[de_index] = nc; + curve_cache_.insert_or_assign(de_index, nc); return nc; } @@ -850,7 +850,7 @@ private: std::vector> g = {{Point3D(0,0,0), Point3D(1,0,0)}, {Point3D(0,1,0), Point3D(1,1,0)}}; auto ns = curves::NurbsSurface(g, {0,0,1,1}, {0,0,1,1}, {}, 1, 1); - surface_cache_[de_index] = ns; + surface_cache_.insert_or_assign(de_index, ns); return ns; } @@ -877,7 +877,7 @@ private: // Keep default surface } - surface_cache_[de_index] = ns; + surface_cache_.insert_or_assign(de_index, ns); return ns; }