gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] /srv/bzr/gnash/trunk r10932: Simplify TextFieldAutoSize,


From: Benjamin Wolsey
Subject: [Gnash-commit] /srv/bzr/gnash/trunk r10932: Simplify TextFieldAutoSize, remove from ClassHierarchy.
Date: Wed, 27 May 2009 17:03:50 +0200
User-agent: Bazaar (1.13.1)

------------------------------------------------------------
revno: 10932
committer: Benjamin Wolsey <address@hidden>
branch nick: trunk
timestamp: Wed 2009-05-27 17:03:50 +0200
message:
  Simplify TextFieldAutoSize, remove from ClassHierarchy.
modified:
  libcore/asobj/ClassHierarchy.cpp
  libcore/asobj/flash/text/TextFieldAutoSize_as.cpp
  libcore/asobj/flash/text/TextFieldAutoSize_as.h
=== modified file 'libcore/asobj/ClassHierarchy.cpp'
--- a/libcore/asobj/ClassHierarchy.cpp  2009-05-27 13:02:02 +0000
+++ b/libcore/asobj/ClassHierarchy.cpp  2009-05-27 15:03:50 +0000
@@ -343,8 +343,6 @@
        { Accessibility_class_init, NSV::CLASS_ACCESSIBILITY, NSV::CLASS_OBJECT,
           NSV::NS_FLASH_ACCESSIBILITY, 5 },
        { int_class_init, NSV::CLASS_INT, NSV::CLASS_OBJECT, NS_GLOBAL, 9 },
-       { textfieldautosize_class_init, NSV::CLASS_TEXTFIELDAUTOSIZE,
-        NSV::CLASS_OBJECT, NS_GLOBAL, 9 },
        { namespace_class_init, NSV::CLASS_NAMESPACE, NSV::CLASS_OBJECT,
         NS_GLOBAL, 9 }
 //  { function_name, name key, super name key, lowest version },

=== modified file 'libcore/asobj/flash/text/TextFieldAutoSize_as.cpp'
--- a/libcore/asobj/flash/text/TextFieldAutoSize_as.cpp 2009-05-24 22:25:59 
+0000
+++ b/libcore/asobj/flash/text/TextFieldAutoSize_as.cpp 2009-05-27 15:03:50 
+0000
@@ -29,45 +29,33 @@
 #include <sstream>
 
 namespace gnash {
-void attachTextFieldAutoSizeInterface(as_object& o);
-
-class text_field_auto_size_as_object : public as_object
+
+// Forward declarations   
+namespace {
+    void attachTextFieldAutoSizeInterface(as_object& o);
+    as_object* getTextFieldAutoSizeInterface();
+}
+
+// extern
+void
+textfieldautosize_class_init(as_object& where)
 {
-
-public:
-
-       text_field_auto_size_as_object()
-               :
-               as_object()
-       {
-       }
-
-};
+       where.init_member("TextFieldAutoSize", getTextFieldAutoSizeInterface());
+}
+
+namespace {
 
 as_object*
 getTextFieldAutoSizeInterface()
 {
        static boost::intrusive_ptr<as_object> o;
-       if ( ! o )
-       {
+       if (!o) {
                o = new as_object(getObjectInterface());
                attachTextFieldAutoSizeInterface(*o);
        }
        return o.get();
 }
 
-// extern
-void textfieldautosize_class_init(as_object& where)
-{
-       where.init_member("TextFieldAutoSize", getTextFieldAutoSizeInterface());
-}
-
-std::auto_ptr<as_object>
-init_text_field_auto_size_instance()
-{
-       return std::auto_ptr<as_object>(new text_field_auto_size_as_object);
-}
-
 void
 attachTextFieldAutoSizeInterface(as_object& o)
 {
@@ -77,5 +65,5 @@
        o.init_member("NONE", as_value("none"));
 }
 
-
-}
+} // anonymous namespace
+} // gnash namespace

=== modified file 'libcore/asobj/flash/text/TextFieldAutoSize_as.h'
--- a/libcore/asobj/flash/text/TextFieldAutoSize_as.h   2009-05-25 18:28:53 
+0000
+++ b/libcore/asobj/flash/text/TextFieldAutoSize_as.h   2009-05-27 15:03:50 
+0000
@@ -24,8 +24,6 @@
 #ifndef GNASH_TEXTFIELDAUTOSIZE_H
 #define GNASH_TEXTFIELDAUTOSIZE_H
 
-#include <memory> // for auto_ptr
-
 namespace gnash {
 
 class as_object;
@@ -33,12 +31,6 @@
 /// Initialize the TextFieldAutoSize Class
 void textfieldautosize_class_init(as_object& where);
 
-/// Return a TextFieldAutoSize instance
-std::auto_ptr<as_object> init_text_field_auto_size_instance();
-
-as_object* getTextFieldAutoSizeInterface();
-
-
 }
 
 #endif // GNASH_INT_AS_H


reply via email to

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