gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] /srv/bzr/gnash/trunk r9660: Small cleanups.


From: Benjamin Wolsey
Subject: [Gnash-commit] /srv/bzr/gnash/trunk r9660: Small cleanups.
Date: Tue, 02 Sep 2008 18:03:46 +0200
User-agent: Bazaar (1.5)

------------------------------------------------------------
revno: 9660
committer: Benjamin Wolsey <address@hidden>
branch nick: trunk
timestamp: Tue 2008-09-02 18:03:46 +0200
message:
  Small cleanups.
modified:
  libbase/utf8.cpp
  libbase/utility.h
    ------------------------------------------------------------
    revno: 9658.1.1
    committer: Benjamin Wolsey <address@hidden>
    branch nick: work
    timestamp: Tue 2008-09-02 17:50:01 +0200
    message:
      Cleanup utf8.cpp, remove unused (and very odd) iabs function from 
utility.h
    modified:
      libbase/utf8.cpp
      libbase/utility.h
=== modified file 'libbase/utf8.cpp'
--- a/libbase/utf8.cpp  2008-04-28 06:52:45 +0000
+++ b/libbase/utf8.cpp  2008-09-02 15:50:01 +0000
@@ -31,7 +31,7 @@
 utf8::decodeCanonicalString(const std::string& str, int version)
 {
        
-       std::wstring wstr = L"";
+       std::wstring wstr;
        
        std::string::const_iterator it = str.begin(), e = str.end();
        
@@ -65,7 +65,7 @@
 utf8::encodeCanonicalString(const std::wstring& wstr, int version)
 {
 
-       std::string str = "";
+       std::string str;
        
        std::wstring::const_iterator it = wstr.begin();
        while ( it != wstr.end())
@@ -81,7 +81,7 @@
 std::string
 utf8::encodeLatin1Character(boost::uint32_t ucsCharacter)
 {
-       std::string text = "";
+       std::string text;
        text.push_back(static_cast<unsigned char>(ucsCharacter));
        return text;
 }
@@ -121,7 +121,7 @@
        if (it == e || *it == 0) return 0;      // End of buffer.  Do not 
advance.
 
        // Conventional 7-bit ASCII; return and increment iterator:
-       if ((*it & 0x80) == 0) return (boost::uint32_t) *it++;
+       if ((*it & 0x80) == 0) return static_cast<boost::uint32_t>(*it++);
 
        // Multi-byte sequences
        if ((*it & 0xE0) == 0xC0)

=== modified file 'libbase/utility.h'
--- a/libbase/utility.h 2008-08-18 23:53:04 +0000
+++ b/libbase/utility.h 2008-09-02 15:50:01 +0000
@@ -99,11 +99,6 @@
     return utility::isFinite(x) ? x : 0.0;
 }
 
-inline int iabs(int i)
-{
-    return (i < 0) ? -i : i;
-}
-
 template <typename T> inline T clamp(T i, T min, T max)
 {
        assert( min <= max );


reply via email to

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