summaryrefslogtreecommitdiff
path: root/drawinglayer/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-08-13 13:33:08 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-08-13 15:35:36 +0200
commit9753428dfc2bf038188c9a59af7fd2d789b46517 (patch)
tree923a3d1888dbadc38436de76b9cad343be5380fe /drawinglayer/source
parent53b8fcbd3f81903b171fd59478abf0283c6feb24 (diff)
rtl::Static -> thread-safe static local
Change-Id: If5b7181fb1bb3f3f21ec3742680e5a3e12b21b73 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120431 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'drawinglayer/source')
-rw-r--r--drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx22
1 files changed, 6 insertions, 16 deletions
diff --git a/drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx b/drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx
index ff00b91050f6..743fb792147f 100644
--- a/drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx
+++ b/drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx
@@ -105,16 +105,13 @@ namespace drawinglayer::primitive3d
}
};
- struct theTubeBuffer :
- public rtl::Static< TubeBuffer, theTubeBuffer > {};
-
Primitive3DContainer getLineTubeSegments(
sal_uInt32 nSegments,
const attribute::MaterialAttribute3D& rMaterial)
{
// static data for buffered tube primitives
- TubeBuffer &rTheBuffer = theTubeBuffer::get();
- return rTheBuffer.getLineTubeSegments(nSegments, rMaterial);
+ static TubeBuffer theTubeBuffer;
+ return theTubeBuffer.getLineTubeSegments(nSegments, rMaterial);
}
class CapBuffer
@@ -183,16 +180,13 @@ namespace drawinglayer::primitive3d
}
};
- struct theCapBuffer :
- public rtl::Static< CapBuffer, theCapBuffer > {};
-
Primitive3DContainer getLineCapSegments(
sal_uInt32 nSegments,
const attribute::MaterialAttribute3D& rMaterial)
{
// static data for buffered cap primitives
- CapBuffer &rTheBuffer = theCapBuffer::get();
- return rTheBuffer.getLineCapSegments(nSegments, rMaterial);
+ static CapBuffer theCapBuffer;
+ return theCapBuffer.getLineCapSegments(nSegments, rMaterial);
}
class CapRoundBuffer
@@ -278,17 +272,13 @@ namespace drawinglayer::primitive3d
};
- struct theCapRoundBuffer :
- public rtl::Static< CapRoundBuffer, theCapRoundBuffer > {};
-
-
Primitive3DContainer getLineCapRoundSegments(
sal_uInt32 nSegments,
const attribute::MaterialAttribute3D& rMaterial)
{
// static data for buffered cap primitives
- CapRoundBuffer &rTheBuffer = theCapRoundBuffer::get();
- return rTheBuffer.getLineCapRoundSegments(nSegments, rMaterial);
+ static CapRoundBuffer theCapRoundBuffer;
+ return theCapRoundBuffer.getLineCapRoundSegments(nSegments, rMaterial);
}
Primitive3DContainer getLineJoinSegments(