From 054ef403a8348006997535ba082d739d59dbeee4 Mon Sep 17 00:00:00 2001 From: Martin Owens Date: Wed, 26 Sep 2018 15:27:08 -0400 Subject: Rename unit to unit_out for less confusion --- src/style-internal.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/style-internal.cpp') diff --git a/src/style-internal.cpp b/src/style-internal.cpp index 60120c725..fd2ead300 100644 --- a/src/style-internal.cpp +++ b/src/style-internal.cpp @@ -306,7 +306,7 @@ const Glib::ustring SPILength::get_value() const { if(this->inherit) return Glib::ustring("inherit"); auto value = this->computed; - auto unit = Glib::ustring(""); + auto unit_out = Glib::ustring(""); switch (this->unit) { case SP_CSS_UNIT_NONE: break; @@ -318,23 +318,23 @@ const Glib::ustring SPILength::get_value() const case SP_CSS_UNIT_MM: case SP_CSS_UNIT_CM: case SP_CSS_UNIT_IN: - unit = sp_style_get_css_unit_string(this->unit); - value = Inkscape::Util::Quantity::convert(this->computed, "px", unit); + unit_out = sp_style_get_css_unit_string(this->unit); + value = Inkscape::Util::Quantity::convert(this->computed, "px", unit_out); break; case SP_CSS_UNIT_EM: case SP_CSS_UNIT_EX: - unit = sp_style_get_css_unit_string(this->unit); + unit_out = sp_style_get_css_unit_string(this->unit); value = this->value; break; case SP_CSS_UNIT_PERCENT: - unit = "%"; + unit_out = "%"; value = this->value * 100.0; break; default: /* Invalid */ break; } - return Glib::ustring::format(value) + unit; + return Glib::ustring::format(value) + unit_out; } void -- cgit v1.2.3