chart2/source/view/main/VDataSeries.cxx |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

New commits:
commit 5449a798d1e676ce8bef876270226eaea602f258
Author:     Julien Nabet <serval2...@yahoo.fr>
AuthorDate: Fri May 14 10:55:16 2021 +0200
Commit:     Julien Nabet <serval2...@yahoo.fr>
CommitDate: Fri May 14 12:03:09 2021 +0200

    Avoid temporary var + directly initialize vector in VDataSeries.cxx
    
    Change-Id: Ief280ca4cb2cdadfc41f7c98bdec4044475c7daf
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115588
    Tested-by: Jenkins
    Reviewed-by: Julien Nabet <serval2...@yahoo.fr>

diff --git a/chart2/source/view/main/VDataSeries.cxx 
b/chart2/source/view/main/VDataSeries.cxx
index 545254ecfccc..247fe41a2d27 100644
--- a/chart2/source/view/main/VDataSeries.cxx
+++ b/chart2/source/view/main/VDataSeries.cxx
@@ -277,10 +277,11 @@ void VDataSeries::doSortByXValues()
     sal_Int32 nPointIndex = 0;
     for( nPointIndex=0; nPointIndex < m_nPointCount; nPointIndex++ )
     {
-        std::vector< double > aSinglePoint;
-        aSinglePoint.push_back( (nPointIndex < 
m_aValues_X.Doubles.getLength()) ? m_aValues_X.Doubles[nPointIndex] : fNan );
-        aSinglePoint.push_back( (nPointIndex < 
m_aValues_Y.Doubles.getLength()) ? m_aValues_Y.Doubles[nPointIndex] : fNan );
-        aTmp.push_back( aSinglePoint );
+        aTmp.push_back(
+                        { ((nPointIndex < m_aValues_X.Doubles.getLength()) ? 
m_aValues_X.Doubles[nPointIndex] : fNan),
+                          ((nPointIndex < m_aValues_Y.Doubles.getLength()) ? 
m_aValues_Y.Doubles[nPointIndex] : fNan)
+                        }
+                      );
     }
 
     //do sort
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to