summaryrefslogtreecommitdiffstats
path: root/src/style-internal.cpp
diff options
context:
space:
mode:
authorMarkus Engel <markus.engel@tum.de>2014-07-22 19:16:52 +0000
committerMarkus Engel <markus.engel@tum.de>2014-07-22 19:16:52 +0000
commitd7c36cd293ee35f53a5b47f2795b061888d4f79b (patch)
treede6360804cfdec65afcd11945db38051bd760817 /src/style-internal.cpp
parentReplaced some abs/fabs with std::abs. (diff)
downloadinkscape-d7c36cd293ee35f53a5b47f2795b061888d4f79b.tar.gz
inkscape-d7c36cd293ee35f53a5b47f2795b061888d4f79b.zip
Fixed some logic errors; clang warnings.
(bzr r13460)
Diffstat (limited to 'src/style-internal.cpp')
-rw-r--r--src/style-internal.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/style-internal.cpp b/src/style-internal.cpp
index 6a56d75c0..ae70fc10d 100644
--- a/src/style-internal.cpp
+++ b/src/style-internal.cpp
@@ -270,18 +270,18 @@ SPILength::read( gchar const *str ) {
} else if (!strcmp(e, "em")) {
/* EM square */
unit = SP_CSS_UNIT_EM;
- if( style && &style->font_size ) {
+ if( style ) {
computed = value * style->font_size.computed;
} else {
- computed = value * style->font_size.font_size_default;
+ computed = value * SPIFontSize::font_size_default;
}
} else if (!strcmp(e, "ex")) {
/* ex square */
unit = SP_CSS_UNIT_EX;
- if( style && &style->font_size ) {
+ if( style ) {
computed = value * style->font_size.computed * 0.5; // FIXME
} else {
- computed = value * style->font_size.font_size_default * 0.5;
+ computed = value * SPIFontSize::font_size_default * 0.5;
}
} else if (!strcmp(e, "%")) {
/* Percentage */