gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] /srv/bzr/gnash/trunk r11342: Minor cleanups, split long l


From: Benjamin Wolsey
Subject: [Gnash-commit] /srv/bzr/gnash/trunk r11342: Minor cleanups, split long lines.
Date: Thu, 30 Jul 2009 12:19:26 +0200
User-agent: Bazaar (1.13.1)

------------------------------------------------------------
revno: 11342
committer: Benjamin Wolsey <address@hidden>
branch nick: trunk
timestamp: Thu 2009-07-30 12:19:26 +0200
message:
  Minor cleanups, split long lines.
modified:
  libcore/TextField.cpp
    ------------------------------------------------------------
    revno: 11341.1.1
    committer: Benjamin Wolsey <address@hidden>
    branch nick: temp
    timestamp: Thu 2009-07-30 12:02:27 +0200
    message:
      Don't use deprecated C header. Do use std::make_pair to save extra typing.
      Qualify stdlib functions. Replace DisplayObject with character for 
messages
      about text.
    modified:
      libcore/TextField.cpp
=== modified file 'libcore/TextField.cpp'
--- a/libcore/TextField.cpp     2009-07-30 09:39:40 +0000
+++ b/libcore/TextField.cpp     2009-07-30 10:02:27 +0000
@@ -53,7 +53,8 @@
 #include <boost/assign/list_of.hpp>
 #include <boost/bind.hpp>
 #include <cstdlib>
-#include <ctype.h>
+#include <cctype>
+#include <utility>
 #include <typeinfo>
 #include <map>
 
@@ -2095,12 +2096,12 @@
             return true;
         }
         
-        // Check for NULL DisplayObject
+        // Check for NULL character
         if (*it == 0) {
-            log_error("found NULL DisplayObject in htmlText");
+            log_error("found NULL character in htmlText");
             return false;
         }
-        tag.push_back(toupper(*it));
+        tag.push_back(std::toupper(*it));
         ++it;
     }
     while (it != e && *it == ' ') {
@@ -2129,7 +2130,7 @@
         while (it != e && *it != '=' && *it != ' ') {
             
             if (*it == 0) {
-                log_error("found NULL DisplayObject in htmlText");
+                log_error("found NULL character in htmlText");
                 return false;
             }
             if (*it == '>') {
@@ -2140,7 +2141,7 @@
                 return false;
             }
             
-            attname.push_back(toupper(*it));
+            attname.push_back(std::toupper(*it));
             ++it;
         }
         while (it != e && (*it == ' ' || *it == '=')) {
@@ -2148,7 +2149,8 @@
         }
         if (it != e) {
             if (*it != '"') { //make sure attribute value is opened with '"'
-                log_error("attribute value must be opened with \'\"\' (did you 
remember escape char?)");
+                log_error("attribute value must be opened with \'\"\' "
+                        "(did you remember escape char?)");
                 while (it != e) {
                     ++it;
                 }
@@ -2160,16 +2162,17 @@
         while (it != e && *it != '"') { //get attribute value
 
             if (*it == 0) {
-                log_error("found NULL DisplayObject in htmlText");
+                log_error("found NULL character in htmlText");
                 return false;
             }
 
-            attvalue.push_back(toupper(*it));
+            attvalue.push_back(std::toupper(*it));
             ++it;
         }
         if (it != e) {
             if (*it != '"') { //make sure attribute value is closed with '"'
-                log_error("attribute value must be closed with \'\"\' (did you 
remember escape char?)");
+                log_error("attribute value must be closed with \'\"\' "
+                        "(did you remember escape char?)");
                 while (it != e) {
                     ++it;
                 }
@@ -2178,7 +2181,7 @@
                 ++it; //skip (")
             }
         }
-        attributes.insert( std::pair<std::string,std::string>(attname, 
attvalue));
+        attributes.insert(std::make_pair(attname, attvalue));
         attname = "";
         attvalue = "";
         if ((*it != ' ') && (*it != '/') && (*it != '>')) {


reply via email to

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