summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2024-09-04 09:57:39 +0500
committerMike Kaganski <mike.kaganski@collabora.com>2024-09-04 09:25:26 +0200
commitc785399884650fd0a1a4ffc3008fbb665e47a9d3 (patch)
tree75fe842f05df061aa7c4ade38d882cbb1eb9b74a
parent406f879af36c8cc524d87292ddffca7426811fa0 (diff)
In MSVC, non-static constexpr objects are initialized at run-time
Yes, it's a memcpy from a compile-time blob, but still they are stack-allocated, so cycles are spent on their initialization. Change-Id: I152369887a7769087e5dfe139ea82498533835b5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172850 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
-rw-r--r--connectivity/source/drivers/firebird/PreparedStatement.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/connectivity/source/drivers/firebird/PreparedStatement.cxx b/connectivity/source/drivers/firebird/PreparedStatement.cxx
index 9fb70c305adb..28746c4f84cb 100644
--- a/connectivity/source/drivers/firebird/PreparedStatement.cxx
+++ b/connectivity/source/drivers/firebird/PreparedStatement.cxx
@@ -358,7 +358,7 @@ namespace {
sal_Int64 toPowOf10AndRound(double n, int powOf10)
{
- constexpr sal_Int64 powers[] = {
+ static constexpr sal_Int64 powers[] = {
1,
10,
100,