[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Check return of function
From: |
Alexei Podtelezhnikov |
Subject: |
Re: Check return of function |
Date: |
Thu, 20 Aug 2020 15:43:34 -0400 |
Kleber,
Why would you prefer uninitialized t42size->ttsize to NULL? Please
answer this question.
Alexei
On Thu, Aug 20, 2020 at 3:20 PM Kleber Tarcísio
<klebertarcisio@yahoo.com.br> wrote:
>
> Hi everyone,
>
> I appreciate your attention!
>
> Today the code is like this:
>
> error = FT_New_Size( t42face->ttf_face, &ttsize );
> t42size->ttsize = ttsize;
> FT_Activate_Size( ttsize );
>
> My initial suggestion was:
>
> error = FT_New_Size( t42face->ttf_face, &ttsize );
> if(error)
> return error;
> t42size->ttsize = ttsize;
> FT_Activate_Size( ttsize );
>
> However, I observed that if ttsize is NULL, FT_Activate_Size function will
> throw an exception. Great
> In this case, what do you think about this another change?
>
> error = FT_New_Size( t42face->ttf_face, &ttsize );
> if(!error)
> t42size->ttsize = ttsize;
> FT_Activate_Size( ttsize );
>
> Regards
>
> Kleber
>
> Em quinta-feira, 20 de agosto de 2020 16:17:27 BRT, Alexei Podtelezhnikov
> <apodtele@gmail.com> escreveu:
>
>
> You need to reply to the list.
>
--
Alexei A. Podtelezhnikov, PhD
- Check return of function, Kleber Tarcísio, 2020/08/20
- Re: Check return of function, Alexei Podtelezhnikov, 2020/08/20
- Message not available
- Re: Check return of function, Alexei Podtelezhnikov, 2020/08/20
- Message not available
- Message not available
- Re: Check return of function, Kleber Tarcísio, 2020/08/20
- Re: Check return of function,
Alexei Podtelezhnikov <=
- Re: Check return of function, Kleber Tarcísio, 2020/08/20
- Re: Check return of function, Werner LEMBERG, 2020/08/21
- Re: Check return of function, Kleber Tarcísio, 2020/08/21