From a20b38f42bae02da47b7cd668320b08653d7daa6 Mon Sep 17 00:00:00 2001 From: Thomas Holder Date: Thu, 22 Aug 2019 19:12:30 +0200 Subject: Eliminate clang warnings -Wconstant-conversion -Wenum-compare-switch -Wpointer-bool-conversion -Wundefined-bool-conversion -Wunused-value Excluding deprecation warnings and 3rdparty directory. --- src/file-update.cpp | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'src/file-update.cpp') diff --git a/src/file-update.cpp b/src/file-update.cpp index 9ab83a7b9..d10a1c02d 100644 --- a/src/file-update.cpp +++ b/src/file-update.cpp @@ -319,20 +319,20 @@ void sp_file_convert_dpi(SPDocument *doc) // Check if potentially need viewbox or unit fix switch (root->width.unit) { - case SP_CSS_UNIT_PC: - case SP_CSS_UNIT_PT: - case SP_CSS_UNIT_MM: - case SP_CSS_UNIT_CM: - case SP_CSS_UNIT_IN: + case SVGLength::PC: + case SVGLength::PT: + case SVGLength::MM: + case SVGLength::CM: + case SVGLength::INCH: need_fix_viewbox = true; break; - case SP_CSS_UNIT_NONE: - case SP_CSS_UNIT_PX: + case SVGLength::NONE: + case SVGLength::PX: need_fix_units = true; break; - case SP_CSS_UNIT_EM: - case SP_CSS_UNIT_EX: - case SP_CSS_UNIT_PERCENT: + case SVGLength::EM: + case SVGLength::EX: + case SVGLength::PERCENT: // OK break; default: @@ -340,20 +340,20 @@ void sp_file_convert_dpi(SPDocument *doc) } switch (root->height.unit) { - case SP_CSS_UNIT_PC: - case SP_CSS_UNIT_PT: - case SP_CSS_UNIT_MM: - case SP_CSS_UNIT_CM: - case SP_CSS_UNIT_IN: + case SVGLength::PC: + case SVGLength::PT: + case SVGLength::MM: + case SVGLength::CM: + case SVGLength::INCH: need_fix_viewbox = true; break; - case SP_CSS_UNIT_NONE: - case SP_CSS_UNIT_PX: + case SVGLength::NONE: + case SVGLength::PX: need_fix_units = true; break; - case SP_CSS_UNIT_EM: - case SP_CSS_UNIT_EX: - case SP_CSS_UNIT_PERCENT: + case SVGLength::EM: + case SVGLength::EX: + case SVGLength::PERCENT: // OK break; default: -- cgit v1.2.3