summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMartin Owens <doctormo@gmail.com>2018-09-26 19:27:08 +0000
committerMartin Owens <doctormo@gmail.com>2018-09-26 19:27:08 +0000
commit054ef403a8348006997535ba082d739d59dbeee4 (patch)
treef047b196da74a81a27ca951b2d9087df2070cc01 /src
parentMove URL toString to a more useful place and some minor fixes (diff)
downloadinkscape-054ef403a8348006997535ba082d739d59dbeee4.tar.gz
inkscape-054ef403a8348006997535ba082d739d59dbeee4.zip
Rename unit to unit_out for less confusion
Diffstat (limited to 'src')
-rw-r--r--src/style-internal.cpp12
1 files changed, 6 insertions, 6 deletions
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