gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_start-


From: Bastiaan Jacques
Subject: [Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_start-238-gf46e5dc
Date: Fri, 11 Mar 2011 12:32:43 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnash".

The branch, master has been updated
       via  f46e5dc1b7218b47c79a1fe696a9c4174f17d129 (commit)
      from  fc9656bb34be513857aa27ee85485c5777fc5377 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit//commit/?id=f46e5dc1b7218b47c79a1fe696a9c4174f17d129


commit f46e5dc1b7218b47c79a1fe696a9c4174f17d129
Author: Bastiaan Jacques <address@hidden>
Date:   Fri Mar 11 13:31:11 2011 +0100

    boost::variant provides an ostream operator<<; it is neither necessary
    nor desirable to roll our own.

diff --git a/libcore/HostInterface.cpp b/libcore/HostInterface.cpp
index 66c3e02..54cd2dc 100644
--- a/libcore/HostInterface.cpp
+++ b/libcore/HostInterface.cpp
@@ -25,27 +25,16 @@
 
 namespace gnash {
 
-namespace {
-
-struct MessageOutput : public boost::static_visitor<std::ostream&>
+std::ostream&
+operator<<(std::ostream& os, const HostMessage& m)
 {
-    MessageOutput(std::ostream& os) : _os(os) {}
-    std::ostream& operator()(const HostMessage& e) const {
-        return _os << e.event();
-    }
-    std::ostream& operator()(const CustomMessage& e) const {
-        return _os << e.name();
-    }
-private:
-    std::ostream& _os;
-};
-
+    return os << m.event();
 }
 
 std::ostream&
-operator<<(std::ostream& os, const HostInterface::Message& e)
+operator<<(std::ostream& os, const CustomMessage& m)
 {
-    return boost::apply_visitor(MessageOutput(os), e);
+    return os << m.name();
 }
 
 std::ostream&
diff --git a/libcore/HostInterface.h b/libcore/HostInterface.h
index 1922dd9..0413248 100644
--- a/libcore/HostInterface.h
+++ b/libcore/HostInterface.h
@@ -229,11 +229,13 @@ public:
 };
 
 /// Stream a description of any host interface message type.
-std::ostream& operator<<(std::ostream& os, const HostInterface::Message& e);
+std::ostream& operator<<(std::ostream& os, const HostMessage& m);
+std::ostream& operator<<(std::ostream& os, const CustomMessage& m);
 
 /// Stream a description of an expected message.
 std::ostream& operator<<(std::ostream& os, HostMessage::KnownEvent e);
 
+
 } // namespace gnash
 
 #endif

-----------------------------------------------------------------------

Summary of changes:
 libcore/HostInterface.cpp |   21 +++++----------------
 libcore/HostInterface.h   |    4 +++-
 2 files changed, 8 insertions(+), 17 deletions(-)


hooks/post-receive
-- 
Gnash



reply via email to

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