summaryrefslogtreecommitdiff
path: root/dbaccess/qa
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-08-28 15:09:33 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-08-29 09:05:18 +0200
commit4c91b89d8ce9c34179f31854dc88bd0a9fa84cba (patch)
tree1fe9cc9db455779d33c24320fedc1e25888b3e5c /dbaccess/qa
parenta1f31211920bfae1a21ea375fa5280c9c6595e15 (diff)
new loplugin:oustringbuffer
look for places where we are appending the temporary result of adding strings together, to an OUStringBuffer, where we could rather call append repeatedly and avoid the temporary creation Change-Id: I481435124291ac7fb54b91a78344a9fe5b379a82 Reviewed-on: https://gerrit.libreoffice.org/59708 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'dbaccess/qa')
-rw-r--r--dbaccess/qa/unit/embeddeddb_performancetest.cxx17
1 files changed, 8 insertions, 9 deletions
diff --git a/dbaccess/qa/unit/embeddeddb_performancetest.cxx b/dbaccess/qa/unit/embeddeddb_performancetest.cxx
index 26b77b555fe1..444f283d9630 100644
--- a/dbaccess/qa/unit/embeddeddb_performancetest.cxx
+++ b/dbaccess/qa/unit/embeddeddb_performancetest.cxx
@@ -137,12 +137,11 @@ void EmbeddedDBPerformanceTest::printTimes(
const TimeValue* pTime2,
const TimeValue* pTime3)
{
- m_aOutputBuffer.append(
- getPrintableTimeValue(pTime1) + "\t" +
- getPrintableTimeValue(pTime2) + "\t" +
- getPrintableTimeValue(pTime3) + "\t"
- "\n"
- );
+ m_aOutputBuffer
+ .append(getPrintableTimeValue(pTime1)).append("\t")
+ .append(getPrintableTimeValue(pTime2)).append("\t")
+ .append(getPrintableTimeValue(pTime3)).append("\t")
+ .append("\n");
}
const char EmbeddedDBPerformanceTest::our_sEnableTestEnvVar[] = "DBA_PERFTEST";
@@ -284,7 +283,7 @@ void EmbeddedDBPerformanceTest::performPreparedStatementInsertTest(
getTimeDifference(&aStart, &aMiddle, &aTimeInsert);
getTimeDifference(&aMiddle, &aEnd, &aTimeCommit);
getTimeDifference(&aStart, &aEnd, &aTimeTotal);
- m_aOutputBuffer.append("Insert: " + rDBName + "\n");
+ m_aOutputBuffer.append("Insert: ").append(rDBName).append("\n");
printTimes(&aTimeInsert, &aTimeCommit, &aTimeTotal);
pFile->Close();
@@ -322,7 +321,7 @@ void EmbeddedDBPerformanceTest::performStatementInsertTest(
getTimeDifference(&aStart, &aMiddle, &aTimeInsert);
getTimeDifference(&aMiddle, &aEnd, &aTimeCommit);
getTimeDifference(&aStart, &aEnd, &aTimeTotal);
- m_aOutputBuffer.append("Insert: " + rDBName + "\n");
+ m_aOutputBuffer.append("Insert: ").append(rDBName).append("\n");
printTimes(&aTimeInsert, &aTimeCommit, &aTimeTotal);
pFile->Close();
@@ -353,7 +352,7 @@ void EmbeddedDBPerformanceTest::performReadTest(
getTimeDifference(&aStart, &aMiddle, &aTimeSelect);
getTimeDifference(&aMiddle, &aEnd, &aTimeIterate);
getTimeDifference(&aStart, &aEnd, &aTimeTotal);
- m_aOutputBuffer.append("Read from: " + rDBName + "\n");
+ m_aOutputBuffer.append("Read from: ").append(rDBName).append("\n");
printTimes(&aTimeSelect, &aTimeIterate, &aTimeTotal);
}