summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-04-07 10:02:18 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-04-09 20:51:44 +0200
commiteaf071397a1ff30536616f2ed76051f77fd38ed6 (patch)
treece55cdc75a0826c54b6b60458a028251f11fcb78 /connectivity/source/drivers
parent1e79befa61a08de7a1ddaccb6c435dbb8015c063 (diff)
new loplugin:unnecessarygetstr
which prevents constructing unnecessary temporaries via getStr() Change-Id: I9ca70893a10e954b5ee0e6ad6098660ee24c2bef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150170 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'connectivity/source/drivers')
-rw-r--r--connectivity/source/drivers/mysqlc/mysqlc_resultset.cxx3
1 files changed, 1 insertions, 2 deletions
diff --git a/connectivity/source/drivers/mysqlc/mysqlc_resultset.cxx b/connectivity/source/drivers/mysqlc/mysqlc_resultset.cxx
index f1c23ca482ad..6d7b6d4d9a77 100644
--- a/connectivity/source/drivers/mysqlc/mysqlc_resultset.cxx
+++ b/connectivity/source/drivers/mysqlc/mysqlc_resultset.cxx
@@ -509,8 +509,7 @@ DateTime SAL_CALL OResultSet::getTimestamp(sal_Int32 column)
OString sVal = m_aRows[m_nRowPosition][column - 1];
// YY-MM-DD HH:MM:SS
- std::vector<OString> dateAndTime
- = lcl_split(std::string_view(sVal.getStr(), getDataLength(column)), ' ');
+ std::vector<OString> dateAndTime = lcl_split(sVal.subView(0, getDataLength(column)), ' ');
auto dateParts = lcl_split(dateAndTime.at(0), '-');
auto timeParts = lcl_split(dateAndTime.at(1), ':');