Noel Grandin wrote: > Clang cleanup, unused mutex variables > > Some of these were doing nothing useful at all. I removed those. > A couple were protecting static data, and I fixed those to use Mutex > and MutexGuard properly. > > Change-Id: I444d13f8b6c50e526cce8d69d09aeaf240e5c6ca > Reviewed-on: https://gerrit.libreoffice.org/3678 > Reviewed-by: Tor Lillqvist <t...@iki.fi> > Tested-by: Tor Lillqvist <t...@iki.fi> > [snip]
> diff --git a/drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx > b/drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx > index 77487db..495c06f 100644 > --- a/drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx > +++ b/drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx > @@ -42,9 +42,10 @@ namespace drawinglayer > static Primitive3DSequence aLineTubeList; > static sal_uInt32 nLineTubeSegments(0L); > static attribute::MaterialAttribute3D aLineMaterial; > + static ::osl::Mutex aMutex; > > // may exclusively change static data, use mutex > - ::osl::Mutex m_mutex; > + ::osl::MutexGuard aGuard(aMutex); > Thanks a lot for that cleanup! There are two more instances of that kind in this file though, and beyond that - anyone eager to replace this with proper rtl::Static (with the benefit of much faster subsequent access to the statics)? Usage is rather nicely documented in include/rtl/instance.hxx - for this case, StaticWithInit seems ideal. Cheers, -- Thorsten
signature.asc
Description: Digital signature
_______________________________________________ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice