summaryrefslogtreecommitdiff
path: root/sax/qa
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-09-04 12:16:17 +0200
committerBjörn Michaelsen <bjoern.michaelsen@canonical.com>2015-10-20 11:35:31 +0000
commit56e6f0da839c53867947d1e06f0e733022df7d0e (patch)
treebedad09b04f92578b067b62d51f160be9a389dd1 /sax/qa
parent9e7e264bdf9459487037345917aea7b35de7e7a0 (diff)
new loplugin: badvectorinit
look for places calling the 1-argument vector fill constructor and then immediately called push_back, which is generally a sign that its leaving empty slots. Change-Id: I34e69b8d09cc48c0d409499faaf192b9f86bc517 Reviewed-on: https://gerrit.libreoffice.org/17525 Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com> Tested-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
Diffstat (limited to 'sax/qa')
-rw-r--r--sax/qa/cppunit/test_converter.cxx4
1 files changed, 1 insertions, 3 deletions
diff --git a/sax/qa/cppunit/test_converter.cxx b/sax/qa/cppunit/test_converter.cxx
index 67290d59facd..1e3061e8090f 100644
--- a/sax/qa/cppunit/test_converter.cxx
+++ b/sax/qa/cppunit/test_converter.cxx
@@ -664,9 +664,7 @@ void doTestDecodeBase64(const uno::Sequence<sal_Int8>& aPass, char const*const p
void ConverterTest::testBase64()
{
- std::vector< sal_Int8 > tempSeq(4);
- for(sal_Int8 i = 0; i<4; ++i)
- tempSeq.push_back(i);
+ std::vector< sal_Int8 > tempSeq { 0, 0, 0, 0, 0, 1, 2, 3 };
uno::Sequence< sal_Int8 > tempSequence = comphelper::containerToSequence(tempSeq);
doTestEncodeBase64("AAAAAAABAgM=", tempSequence);
doTestDecodeBase64(tempSequence, "AAAAAAABAgM=");