[Libreoffice-commits] core.git: canvas/source

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Wed Aug 5 06:08:55 UTC 2020


 canvas/source/tools/verifyinput.cxx |    4 ----
 1 file changed, 4 deletions(-)

New commits:
commit 99d281201cc36dbf1760701343056f8cbed11710
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Tue Aug 4 23:01:35 2020 +0200
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Wed Aug 5 08:08:16 2020 +0200

    Throw detailed IllegalArgumentException regardless of OSL_DEBUG_LEVEL
    
    ...assuming that such an exception is rare enough that any performance impact
    does not matter.  (The code was like this ever since its introduction in
    9e2bf1d54a6e92dcfa3076bf4d7cc623ace87cd3 "INTEGRATION: CWS canvas02".)
    
    This nicely avoids loplugin:unusedmember about unused mpStr and mnArgPos when
    OSL_DEBUG_LEVEL is zero.
    
    Change-Id: I2ad3e36e98a6811ae255525cf8159db89c78ad7f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100143
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
    Tested-by: Jenkins

diff --git a/canvas/source/tools/verifyinput.cxx b/canvas/source/tools/verifyinput.cxx
index 9d0020c12da9..ae0704d81d57 100644
--- a/canvas/source/tools/verifyinput.cxx
+++ b/canvas/source/tools/verifyinput.cxx
@@ -394,15 +394,11 @@ namespace canvas::tools
                 {
                     if( !std::isfinite( rVal ) || rVal < 0.0 )
                     {
-#if OSL_DEBUG_LEVEL > 0
                         throw lang::IllegalArgumentException(
                             OUString::createFromAscii(mpStr) +
                             ": verifyInput(): one of stroke attributes' DashArray value out of range (is " +
                             OUString::number(rVal) + ")",
                             mrIf, mnArgPos );
-#else
-                        throw lang::IllegalArgumentException();
-#endif
                     }
                 }
 


More information about the Libreoffice-commits mailing list