Hi zyx

Yes that makes sense. I was also wandering why we do have logic checks only
in debug.

Would you be so kind and remove the #ifdef NDEBUG? i do not have acess to
svn right now.

Thanks
Dominik

Am 22.02.2018 09:30 schrieb "zyx" <z...@gmx.us>:

> On Wed, 2018-02-21 at 21:51 +0100, Dominik Seichter wrote:
> > It should always be legal to call this:
> > PODOFO_RAISE_LOGIC_IF( m_stack.empty(), "Can get current
> > graphicsstate!" );
> >
> > As it translates to:
> > if( m_stack.empty() ) {
> >  throw ...
> > }
>
>         Hi,
> the macro is fine, the problem is whether you compile Release or Debug
> version of the PoDoFo. From src/base/PdfError.h:
>
>    #ifndef NDEBUG
>        // Woo for double-negatives. We define PODOFO_RAISE_LOGIC_IF unless
> we've been told not to by NDEBUG.
>        #define PODOFO_RAISE_LOGIC_IF( x, y ) { if (x) throw
> ::PoDoFo::PdfError( ePdfError_InternalLogic, __FILE__, __LINE__, y ); };
>    #else
>        #define PODOFO_RAISE_LOGIC_IF( x, y ) {};
>    #endif
>
> My suggestion was to remove that '#ifndef NDEBUG' and define the
> PODOFO_RAISE_LOGIC_IF with the 'throw' always, regardless of the build
> type.
>
>         Bye,
>         zyx
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to