summaryrefslogtreecommitdiff
path: root/include/basegfx/vector
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-06-12 14:06:28 +0200
committerNoel Grandin <noel@peralex.com>2014-06-17 10:55:17 +0200
commit3e82897353e576dc6e3fbf55371fda5a0c3415df (patch)
tree71c2f03128885000efae1852dccb504f8355c79e /include/basegfx/vector
parentec95abf2d8afeec38c9225ea49caa0e08d82b504 (diff)
improve the inlinesimplememberfunctions clang plugin
Change-Id: I6d5a952901648e01904ef5c37f953c517304d31e
Diffstat (limited to 'include/basegfx/vector')
-rw-r--r--include/basegfx/vector/b2dvector.hxx4
-rw-r--r--include/basegfx/vector/b2ivector.hxx2
2 files changed, 3 insertions, 3 deletions
diff --git a/include/basegfx/vector/b2dvector.hxx b/include/basegfx/vector/b2dvector.hxx
index f5148dbe7718..4b95987ddc89 100644
--- a/include/basegfx/vector/b2dvector.hxx
+++ b/include/basegfx/vector/b2dvector.hxx
@@ -141,7 +141,7 @@ namespace basegfx
@return
The Scalar value of the two involved 2D Vectors
*/
- double scalar( const B2DVector& rVec ) const;
+ double scalar( const B2DVector& rVec ) const { return((mfX * rVec.mfX) + (mfY * rVec.mfY)); }
/** Calculate the length of the cross product with another 2D Vector
@@ -158,7 +158,7 @@ namespace basegfx
@return
The length of the cross product of the two involved 2D Vectors
*/
- double cross( const B2DVector& rVec ) const;
+ double cross( const B2DVector& rVec ) const { return(mfX * rVec.getY() - mfY * rVec.getX()); }
/** Calculate the Angle with another 2D Vector
diff --git a/include/basegfx/vector/b2ivector.hxx b/include/basegfx/vector/b2ivector.hxx
index 23eb811becd1..1fdeeb4ea13a 100644
--- a/include/basegfx/vector/b2ivector.hxx
+++ b/include/basegfx/vector/b2ivector.hxx
@@ -121,7 +121,7 @@ namespace basegfx
@return
The Scalar value of the two involved 2D Vectors
*/
- double scalar( const B2IVector& rVec ) const;
+ double scalar( const B2IVector& rVec ) const { return((mnX * rVec.mnX) + (mnY * rVec.mnY)); }
/** Transform vector by given transformation matrix.
ef='/cgit/lo/core/commit/drawinglayer/source/primitive3d/textureprimitive3d.cxx?id=dcb36da2950ad967ad3f633ca12353da98ac620b'>clang-tidy modernize-pass-by-value in drawinglayerNoel Grandin Change-Id: I8a3245c6a4d687edbc95cf28b2932d80c86a7b65 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135828 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2020-12-01do not unnecessarily explicitly force gradient step count (tdf#138581)Luboš Luňák Toolkits usually do not provide the ability to specify gradient steps, which means VCL falls back to its algorithm, which at least with Skia sometimes causes poor results. Change-Id: I35dbf87e77d5ed36d8f257db877135a2a0be2ffe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106971 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com> 2020-03-21move headers inside modulesNoel Grandin Change-Id: Iad5c414861eb807e6246b8a988b94d66ef5f687d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90776 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2020-01-20clang-tidy modernize-concat-nested-namespace in drawinglayerNoel Grandin Change-Id: If2644743ab0d9b78d42d1d2fe6fa22c83472d2c1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87065 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> 2017-08-18loplugin:unnecessaryparenNoel Grandin look for statements like return (function()); Change-Id: I906cf2183489f87225b99b987caca67e39b26cc3 Reviewed-on: https://gerrit.libreoffice.org/41260 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> 2016-05-23Convert GradientStyle to scoped enumNoel Grandin Change-Id: I1da151dd25648e363ba88bf88caa3e820f0ee424 Reviewed-on: https://gerrit.libreoffice.org/25270 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com> 2016-02-09Remove excess newlinesChris Sherlock A ridiculously fast way of doing this is: for i in $(pcregrep -l -M -r --include='.*[hc]xx$' \ --exclude-dir=workdir --exclude-dir=instdir '^ {3,}' .) do perl -0777 -i -pe 's/^ {3,}/ /gm' $i done Change-Id: Iebb93eccbee9e4fc5c4380474ba595858a27ac2c Reviewed-on: https://gerrit.libreoffice.org/22224 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> 2015-12-15use vector as container for Primitive3DReferenceNoel Grandin rather than uno::Sequence, since we modify this container a lot and uno::Sequence is expensive to update Change-Id: Id5bc5171cbc4b90b243e6dda6d572f21b3bdf00d