gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] /srv/bzr/gnash/trunk r11367: Fixed compiler warnings


From: Sharad Desai
Subject: [Gnash-commit] /srv/bzr/gnash/trunk r11367: Fixed compiler warnings
Date: Tue, 04 Aug 2009 16:18:40 -0600
User-agent: Bazaar (1.16.1)

------------------------------------------------------------
revno: 11367 [merge]
committer: Sharad Desai <address@hidden>
branch nick: trunk
timestamp: Tue 2009-08-04 16:18:40 -0600
message:
  Fixed compiler warnings
modified:
  libcore/TextField.cpp
  libcore/TextField.h
=== modified file 'libcore/TextField.cpp'
--- a/libcore/TextField.cpp     2009-08-04 21:28:13 +0000
+++ b/libcore/TextField.cpp     2009-08-04 22:17:22 +0000
@@ -728,7 +728,7 @@
                                
                                        if ( maxChars()!=0 )
                                        {
-                                               if ( _maxChars < _glyphcount )
+                                               if ( _maxChars <= _glyphcount )
                                                {
                                                        break;
                                                }
@@ -944,6 +944,10 @@
     if ( tf.bulletDefined() ) setBullet(tf.bullet());
     if ( tf.displayDefined() ) setDisplay(tf.display());
        if ( tf.tabStopsDefined() ) setTabStops(tf.tabStops());
+       
+       // NEED TO IMPLEMENT THESE TWO
+       if ( tf.urlDefined() ) setURL(tf.url());
+       if ( tf.targetDefined() ) setTarget(tf.target());
     
     format_text();
 }
@@ -1331,9 +1335,6 @@
     LineStarts::iterator linestartit = _line_starts.begin();
     LineStarts::const_iterator linestartend = _line_starts.end();
 
-    // See bug #24266
-    const rect& defBounds = _bounds;
-
     AutoSizeValue autoSize = getAutoSize();
     if ( autoSize != autoSizeNone )
     {
@@ -1348,9 +1349,6 @@
         }
     }
 
-    // Should get info from autoSize too maybe ?
-    TextAlignment textAlignment = getTextAlignment();
-
     // FIXME: I don't think we should query the definition
     // to find the appropriate font to use, as ActionScript
     // code should be able to change the font of a TextField
@@ -1464,7 +1462,6 @@
     float fontLeading = _font->leading() * scale;
     _linesindisplay = _bounds.height() / (fontHeight + fontLeading + 
PADDING_TWIPS);
     if (_linesindisplay > 0) { //no need to place lines if we can't fit any
-        float fontDescent = _font->descent() * scale; 
         size_t manylines = _line_starts.size();
         size_t lastvisibleline = _scroll + _linesindisplay;
         size_t line = 0;
@@ -1517,9 +1514,9 @@
 }
 
 void
-TextField::newLine(std::wstring::const_iterator& it, boost::int32_t& x,
-        boost::int32_t& y, SWF::TextRecord& rec, int& last_space_glyph,
-        LineStarts::value_type& last_line_start_record, float div)
+TextField::newLine(boost::int32_t& x, boost::int32_t& y, 
+                                  SWF::TextRecord& rec, int& last_space_glyph,
+                               LineStarts::value_type& last_line_start_record, 
float div)
 {
     // newline.
     LineStarts::iterator linestartit = _line_starts.begin();
@@ -1668,7 +1665,7 @@
             case 13:
             case 10:
             {
-                
newLine(it,x,y,rec,last_space_glyph,last_line_start_record,1.0);
+                newLine(x,y,rec,last_space_glyph,last_line_start_record,1.0);
                 break;
             }
             case '<':
@@ -1818,7 +1815,7 @@
 
                                                        handleChar(it, e, x, y, 
newrec, last_code,
                                     last_space_glyph, last_line_start_record);
-                                                       newLine(it, x, y, 
newrec, last_space_glyph,
+                                                       newLine(x, y, newrec, 
last_space_glyph,
                                     last_line_start_record, 1.0);
                         } else if (s == "SPAN") {
                             //span
@@ -1907,12 +1904,12 @@
                             //paragraph
                             if (_display == BLOCK)
                             {
-                                newLine(it, x, y, rec, last_space_glyph,
+                                newLine(x, y, rec, last_space_glyph,
                                         last_line_start_record, 1.5);
                                 handleChar(it, e, x, y, newrec, last_code,
                                         last_space_glyph,
                                         last_line_start_record);
-                                newLine(it, x, y, rec, last_space_glyph,
+                                newLine(x, y, rec, last_space_glyph,
                                         last_line_start_record, 1.0);
                             }
                             else
@@ -1923,7 +1920,7 @@
                             }
                         } else if (s == "BR") {
                             //line break
-                                                       newLine(it, x, y, rec, 
last_space_glyph,
+                                                       newLine(x, y, rec, 
last_space_glyph,
                                                                                
last_line_start_record, 1.0);
                         } else {
                             log_debug("<%s> tag is unsupported", s);

=== modified file 'libcore/TextField.h'
--- a/libcore/TextField.h       2009-08-04 17:14:06 +0000
+++ b/libcore/TextField.h       2009-08-04 22:17:22 +0000
@@ -604,9 +604,9 @@
        
        /// Handles a new line, this will be called several times, so this
        /// will hopefully make code cleaner
-       void newLine(std::wstring::const_iterator& it, boost::int32_t& x,
-            boost::int32_t& y, SWF::TextRecord& rec, int& last_space_glyph,
-            LineStarts::value_type& last_line_start_record, float div);
+       void newLine(boost::int32_t& x, boost::int32_t& y, 
+                                SWF::TextRecord& rec, int& last_space_glyph,
+                                LineStarts::value_type& 
last_line_start_record, float div);
                                        
        /// De-reference and do appropriate action for character iterator
        void handleChar(std::wstring::const_iterator& it,
@@ -745,7 +745,7 @@
     bool _password;
 
     /// Corresponds to the maxChars property.
-    boost::int32_t _maxChars;
+    size_t _maxChars;
        /// The flag keeping status of TextVariable registration
        //
        /// It will be set to true if there's no need to register


reply via email to

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