[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/trunk r12215: drop using namespace std; a
From: |
Rob Savoye |
Subject: |
[Gnash-commit] /srv/bzr/gnash/trunk r12215: drop using namespace std; and optimize a few methods to return simple strings instead of a stringstream. |
Date: |
Thu, 03 Jun 2010 13:29:37 -0600 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 12215
committer: Rob Savoye <address@hidden>
branch nick: trunk
timestamp: Thu 2010-06-03 13:29:37 -0600
message:
drop using namespace std; and optimize a few methods to return simple strings
instead of a stringstream.
modified:
libcore/ExternalInterface.cpp
libcore/asobj/flash/external/ExternalInterface_as.cpp
=== modified file 'libcore/ExternalInterface.cpp'
--- a/libcore/ExternalInterface.cpp 2010-06-01 03:48:36 +0000
+++ b/libcore/ExternalInterface.cpp 2010-06-03 19:29:37 +0000
@@ -49,8 +49,6 @@
#include "movie_root.h"
#include "log.h"
-using namespace std;
-
namespace gnash {
/// Class used to serialize properties of an object to a buffer
@@ -133,7 +131,6 @@
obj->visitProperties<IsEnumerable>(props);
if (!props.success()) {
log_error("Could not serialize object");
- return false;
} else {
std::vector<as_value> properties = props.getArgs();
}
@@ -160,7 +157,6 @@
obj->visitProperties<IsEnumerable>(props);
if (!props.success()) {
log_error("Could not serialize object");
- return false;
}
ss << props.getXML();
@@ -393,9 +389,9 @@
}
invoke.reset(new ExternalInterface::invoke_t);
- string::size_type start = 0;
- string::size_type end;
- string tag;
+ std::string::size_type start = 0;
+ std::string::size_type end;
+ std::string tag;
// Look for the ending > in the first part of the data for the tag
end = xml.find(">");
@@ -535,31 +531,19 @@
std::string
ExternalInterface::makeNull ()
{
- std::stringstream ss;
-
- ss << "<null/>";
-
- return ss.str();
+ return "<null/>";
}
std::string
ExternalInterface::makeTrue ()
{
- std::stringstream ss;
-
- ss << "<true/>";
-
- return ss.str();
+ return "<true/>";
}
std::string
ExternalInterface::makeFalse ()
{
- std::stringstream ss;
-
- ss << "<false/>";
-
- return ss.str();
+ return "<false/>";
}
std::string
=== modified file 'libcore/asobj/flash/external/ExternalInterface_as.cpp'
--- a/libcore/asobj/flash/external/ExternalInterface_as.cpp 2010-06-02
14:18:20 +0000
+++ b/libcore/asobj/flash/external/ExternalInterface_as.cpp 2010-06-03
19:29:37 +0000
@@ -48,8 +48,6 @@
#include "movie_root.h"
#include "log.h"
-using namespace std;
-
namespace gnash {
namespace {
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] /srv/bzr/gnash/trunk r12215: drop using namespace std; and optimize a few methods to return simple strings instead of a stringstream.,
Rob Savoye <=