diff options
| author | Matthew Petroff <matthew@mpetroff.net> | 2013-07-06 15:01:59 +0000 |
|---|---|---|
| committer | Matthew Petroff <matthew@mpetroff.net> | 2013-07-06 15:01:59 +0000 |
| commit | d04405f745da587b2a3ccca8d2ca7bf49edf2d4d (patch) | |
| tree | 6ff9bee696703f2de19e81a1a4727e4dbbae8e46 /src/util | |
| parent | Ported measure-context.cpp (to do: port widgets/measure-toolbar.cpp so unit s... (diff) | |
| download | inkscape-d04405f745da587b2a3ccca8d2ca7bf49edf2d4d.tar.gz inkscape-d04405f745da587b2a3ccca8d2ca7bf49edf2d4d.zip | |
Switch setWidth and setHeight to use Quantity and switch to forward declaration of Inkscape::Util::Quantity in document.h.
(bzr r12380.1.7)
Diffstat (limited to 'src/util')
| -rw-r--r-- | src/util/units.cpp | 2 | ||||
| -rw-r--r-- | src/util/units.h | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/util/units.cpp b/src/util/units.cpp index d0e4e7941..a51eb2570 100644 --- a/src/util/units.cpp +++ b/src/util/units.cpp @@ -386,7 +386,7 @@ void UnitsSAXHandler::_endElement(xmlChar const *xname) } /** Initialize a quantity. */ -Quantity::Quantity(Unit *u, double q) { +Quantity::Quantity(double q, const Unit *u) { unit = u; quantity = q; } diff --git a/src/util/units.h b/src/util/units.h index 7ef7001bb..0ea84bfbb 100644 --- a/src/util/units.h +++ b/src/util/units.h @@ -93,10 +93,10 @@ class UnitTable { class Quantity { public: - Unit *unit; + const Unit *unit; double quantity; - Quantity(Unit *u, double q); // constructor + Quantity(double q, const Unit *u); // constructor bool compatibleWith(const Unit *u) const; double value(Unit *u) const; |
