diff options
author | Hans-Joachim Lankenau <hjs@openoffice.org> | 2004-06-25 16:18:36 +0000 |
---|---|---|
committer | Hans-Joachim Lankenau <hjs@openoffice.org> | 2004-06-25 16:18:36 +0000 |
commit | 24d402bac4f6b48262be712d622e1e4054a5ecb6 (patch) | |
tree | c77c89c542086b1156cf0fdc0d1babae119b1aae /basegfx/source/tuple | |
parent | 7026f47374933a35c2a86e997410a34673b8f71c (diff) |
INTEGRATION: CWS tune04 (1.6.26); FILE MERGED
2004/06/15 07:23:34 cmc 1.6.26.1: #i29636# turn global objects into local static data protected with swishy double-locked templated template
Diffstat (limited to 'basegfx/source/tuple')
-rw-r--r-- | basegfx/source/tuple/b2dtuple.cxx | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/basegfx/source/tuple/b2dtuple.cxx b/basegfx/source/tuple/b2dtuple.cxx index caf527d2d522..7626dc048eeb 100644 --- a/basegfx/source/tuple/b2dtuple.cxx +++ b/basegfx/source/tuple/b2dtuple.cxx @@ -2,9 +2,9 @@ * * $RCSfile: b2dtuple.cxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: thb $ $Date: 2004-01-16 10:34:35 $ + * last change: $Author: hjs $ $Date: 2004-06-25 17:18:36 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -66,21 +66,28 @@ #ifndef _BGFX_NUMERIC_FTOOLS_HXX #include <basegfx/numeric/ftools.hxx> #endif +#ifndef INCLUDED_RTL_INSTANCE_HXX +#include <rtl/instance.hxx> +#endif + +namespace { struct EmptyTuple : public rtl::Static<basegfx::B2DTuple, EmptyTuple> {}; } namespace basegfx { - // initialize static member - ::basegfx::B2DTuple B2DTuple::maEmptyTuple(0.0, 0.0); + const B2DTuple& B2DTuple::getEmptyTuple() + { + return EmptyTuple::get(); + } bool B2DTuple::equalZero() const { - return (this == &maEmptyTuple || + return (this == &getEmptyTuple() || (::basegfx::fTools::equalZero(mfX) && ::basegfx::fTools::equalZero(mfY))); } bool B2DTuple::equalZero(const double& rfSmallValue) const { - return (this == &maEmptyTuple || + return (this == &getEmptyTuple() || (::basegfx::fTools::equalZero(mfX, rfSmallValue) && ::basegfx::fTools::equalZero(mfY, rfSmallValue))); } |