From ae2933eea51da2a37348265e4cd0d98a5d883d6e Mon Sep 17 00:00:00 2001 From: csritter <73347739+csritter@users.noreply.github.com> Date: Mon, 26 Aug 2024 01:08:06 -0300 Subject: [PATCH] prevent a copy Co-authored-by: Thomas Krijnen --- src/ifcgeom/taxonomy.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ifcgeom/taxonomy.h b/src/ifcgeom/taxonomy.h index e9b2a5afe1..ceea149091 100644 --- a/src/ifcgeom/taxonomy.h +++ b/src/ifcgeom/taxonomy.h @@ -326,7 +326,7 @@ typedef item const* ptr; style() : specularity(std::numeric_limits::quiet_NaN()), transparency(std::numeric_limits::quiet_NaN()), use_surface_color(false) {} style(const std::string& name) : name(name), specularity(std::numeric_limits::quiet_NaN()), transparency(std::numeric_limits::quiet_NaN()), use_surface_color(false) {} - colour get_color() const { + const colour& get_color() const { if ((use_surface_color && surface) || !diffuse) { return surface; }