From f14b9d30293f180500fc56d81e5390021758e7c1 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 8 Jan 2018 17:01:49 +0200 Subject: convert (a>b?a:b) to std::max(a,b) with something like: git grep -nP '(.*)\s*>\s*(.*)\s*\?\s*\g1\s*:\s*\g2' Change-Id: I60b9a3a2a09162bc0de4c13fdde2c209696e5413 Reviewed-on: https://gerrit.libreoffice.org/47602 Tested-by: Jenkins Reviewed-by: Noel Grandin --- basctl/source/basicide/baside2.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'basctl') diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx index 1c438a908e19..ad26c8d3518e 100644 --- a/basctl/source/basicide/baside2.cxx +++ b/basctl/source/basicide/baside2.cxx @@ -817,7 +817,7 @@ sal_Int32 ModulWindow::FormatAndPrint( Printer* pPrinter, sal_Int32 nPrintPage ) sal_Int32 nLinespPage = aPaperSz.Height()/nLineHeight; long nXTextWidth = pPrinter->approximate_char_width(); - sal_Int32 nCharspLine = aPaperSz.Width() / (nXTextWidth > 1 ? nXTextWidth : 1); + sal_Int32 nCharspLine = aPaperSz.Width() / std::max(nXTextWidth, 1); const sal_uInt32 nParas = GetEditEngine()->GetParagraphCount(); sal_Int32 nPages = nParas/nLinespPage+1; -- cgit