Re: Font Problems

At 11:41 AM 8/29/2002, Owen Taylor wrote:
Won't something like:

     error = Load_Script( &sr[sl->ScriptCount].Script, stream );
     if ( error == TT_Err_Ok )
        sl->ScriptCount += 1;
     else if ( error != TTO_Err_Empty_Script )
        goto Fail;

Work fine?

Yes, that looks like it would work fine. I was thinking about this:

    error = Load_Script( &sr[sl->ScriptCount].Script, stream );
    switch (error)
      TT_Err_Ok:           sl->ScriptCount += 1;
      TT_Err_Empty_Script: break;
      default:             goto Fail;

This appeals to my sense of whimsy, but a good compiler would probably reduce it to what you wrote anyhow. (That's what I get for responding to messages before I'm really awake ;-)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]