sw/source/uibase/dbui/dbmgr.cxx | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-)
New commits: commit e8b57d319cfd46816cc41aeccbcb6aa4a2f7cdef Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Mon Dec 17 09:46:44 2018 +0100 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Mon Dec 17 11:08:39 2018 +0100 Simplify static initializer Change-Id: I82d5e2ad7373fb9d39aa087426ea80ca4559b556 Reviewed-on: https://gerrit.libreoffice.org/65245 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx index b7956cc7ec11..09f88dd03632 100644 --- a/sw/source/uibase/dbui/dbmgr.cxx +++ b/sw/source/uibase/dbui/dbmgr.cxx @@ -1172,16 +1172,12 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell, const OUString sDescriptorPrefix = sPrefix_; // Setup for dumping debugging documents - static const char *sMaxDumpDocs = nullptr; - static sal_Int32 nMaxDumpDocs = 0; - if (!sMaxDumpDocs) - { - sMaxDumpDocs = getenv("SW_DEBUG_MAILMERGE_DOCS"); - if (!sMaxDumpDocs) - sMaxDumpDocs = ""; + static const sal_Int32 nMaxDumpDocs = []() { + if (const char* sEnv = getenv("SW_DEBUG_MAILMERGE_DOCS")) + return OUString(sEnv, strlen(sEnv), osl_getThreadTextEncoding()).toInt32(); else - nMaxDumpDocs = OUString(sMaxDumpDocs, strlen(sMaxDumpDocs), osl_getThreadTextEncoding()).toInt32(); - } + return sal_Int32(0); + }(); ::rtl::Reference< MailDispatcher > xMailDispatcher; ::rtl::Reference< IMailDispatcherListener > xMailListener; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits