head 1.2; access; symbols pkgsrc-2017Q3:1.1.0.8 pkgsrc-2017Q3-base:1.1 pkgsrc-2017Q2:1.1.0.4 pkgsrc-2017Q2-base:1.1 pkgsrc-2017Q1:1.1.0.2 pkgsrc-2017Q1-base:1.1; locks; strict; comment @// @; 1.2 date 2017.09.26.10.27.11; author wiz; state dead; branches; next 1.1; commitid 9ARpkXTuh9Wg2H8A; 1.1 date 2017.02.21.16.01.36; author joerg; state Exp; branches; next ; commitid Oz44ERM0A4sRRPGz; desc @@ 1.2 log @*: remove qt3 and the packages using it, including KDE3 Announced in https://mail-index.netbsd.org/pkgsrc-users/2017/09/10/msg025556.html @ text @$NetBSD: patch-scribus_util.cpp,v 1.1 2017/02/21 16:01:36 joerg Exp $ Simplify logic to avoid expensive nested loop handling in Clang. --- scribus/util.cpp.orig 2017-02-21 14:56:16.278339690 +0000 +++ scribus/util.cpp @@@@ -1412,15 +1412,15 @@@@ const QString arabicToRoman(uint i) roman += "m"; arabic -= 1000000; } - while (arabic - 900000 >= 0){ + if (arabic - 900000 >= 0){ roman += "cm"; arabic -= 900000; } - while (arabic - 500000 >= 0){ + if (arabic - 500000 >= 0){ roman += "d"; arabic -= 500000; } - while (arabic - 400000 >= 0){ + if (arabic - 400000 >= 0){ roman += "cd"; arabic -= 400000; } @@@@ -1428,15 +1428,15 @@@@ const QString arabicToRoman(uint i) roman += "c"; arabic -= 100000; } - while (arabic - 90000 >= 0){ + if (arabic - 90000 >= 0){ roman += "xc"; arabic -= 90000; } - while (arabic - 50000 >= 0){ + if (arabic - 50000 >= 0){ roman += "l"; arabic -= 50000; } - while (arabic - 40000 >= 0){ + if (arabic - 40000 >= 0){ roman += "xl"; arabic -= 40000; } @@@@ -1444,15 +1444,15 @@@@ const QString arabicToRoman(uint i) roman += "x"; arabic -= 10000; } - while (arabic - 9000 >= 0){ + if (arabic - 9000 >= 0){ roman += "Mx"; arabic -= 9000; } - while (arabic - 5000 >= 0){ + if (arabic - 5000 >= 0){ roman += "v"; arabic -= 5000; } - while (arabic - 4000 >= 0){ + if (arabic - 4000 >= 0){ roman += "Mv"; arabic -= 4000; } @@@@ -1460,15 +1460,15 @@@@ const QString arabicToRoman(uint i) roman += "M"; arabic -= 1000; } - while (arabic - 900 >= 0){ + if (arabic - 900 >= 0){ roman += "CM"; arabic -= 900; } - while (arabic - 500 >= 0){ + if (arabic - 500 >= 0){ roman += "D"; arabic -= 500; } - while (arabic - 400 >= 0){ + if (arabic - 400 >= 0){ roman += "CD"; arabic -= 400; } @@@@ -1476,15 +1476,15 @@@@ const QString arabicToRoman(uint i) roman += "C"; arabic -= 100; } - while (arabic - 90 >= 0){ + if (arabic - 90 >= 0){ roman += "XC"; arabic -= 90; } - while (arabic - 50 >= 0){ + if (arabic - 50 >= 0){ roman += "L"; arabic -= 50; } - while (arabic - 40 >= 0){ + if (arabic - 40 >= 0){ roman += "XL"; arabic -= 40; } @@@@ -1492,15 +1492,15 @@@@ const QString arabicToRoman(uint i) roman += "X"; arabic -= 10; } - while (arabic - 9 >= 0){ + if (arabic - 9 >= 0){ roman += "IX"; arabic -= 9; } - while (arabic - 5 >= 0){ + if (arabic - 5 >= 0){ roman += "V"; arabic -= 5; } - while (arabic - 4 >= 0){ + if (arabic - 4 >= 0){ roman += "IV"; arabic -= 4; } @ 1.1 log @Cut down the number of loops in the roman number parser. The existing logic triggers a super-linear memory use path in Clang and is generally overcomplicated. Bump revision because it is still a code change. @ text @d1 1 a1 1 $NetBSD$ @