gnash-commit
[Top][All Lists]
Advanced

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

Re: [Gnash-commit] /srv/bzr/gnash/trunk r11318: Implemented TextField pa


From: Benjamin Wolsey
Subject: Re: [Gnash-commit] /srv/bzr/gnash/trunk r11318: Implemented TextField password, bullet, display properties
Date: Tue, 28 Jul 2009 09:59:06 +0200

> +#include <stdlib.h>

No! include <cstdlib>

> +#include <typeinfo>
>  
>  // Text fields have a fixed 2 pixel padding for each side (regardless of 
> border)
>  #define PADDING_TWIPS 40 
> @@ -117,6 +119,11 @@
>      _tag(&def),
>      _textDefined(def.hasText()),
>      _underlined(false),
> +     _bullet(false),
> +    _url(""),
> +    _target(""),
> +    _tabStops(),
> +     _display(),

It's unnecessary to initialize any of these, though it doesn't do any
harm either.

> +    //~ else
> +    //~ {
> +             //~ std::vector<int> tabStops;
> +             //~ tabStops = _tabStops;
> +             //~ 
> +             //~ std::sort(_tabStops.begin(), _tabStops.end()); 
> +//~ 
> +             //~ int tab = 0;
> +             //~ if ( !_tabStops.empty() )
> +             //~ {
> +                     //~ tab = _tabStops.back();
> +                     //~ 
> +                     //~ for (int i = 0; i < tabStops.size(); ++i)
> +                     //~ {                                   
> +                             //~ if (tabStops[i] > x)
> +                             //~ {
> +                                     //~ if((tabStops[i] - x) < tab) 
> +                                     //~ {
> +                                             //~ tab = tabStops[i] - x;
> +                                     //~ }
> +                             //~ }
> +                             //~ SWF::TextRecord::GlyphEntry ge;
> +                             //~ ge.index = index;
> +                             //~ ge.advance = scale * tab;
> +                             //~ rec.addGlyph(ge);
> +                             //~ x+=ge.advance;
> +                     //~ }
> +             //~ }

Coding guidelines specify that code should be disabled with #if 0, if
it's necessary to disable it at all. If it's not ready, there's not much
reason for it to be in trunk, and if it's obsolete, it should be
deleted.

--
Use Gnash, the GNU Flash Player!
http://www.gnu.org/software/gnash/

Benjamin Wolsey, Software Developer - http://benjaminwolsey.de

Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


reply via email to

[Prev in Thread] Current Thread [Next in Thread]