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_final-


From: Bastiaan Jacques
Subject: [Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-2084-g4cac725
Date: Thu, 29 May 2014 16:01:56 +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  4cac725437d41d50af840ee9dcc7fd9def913187 (commit)
      from  223b921899d45f0c265ac0415c812dcbc1114632 (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=4cac725437d41d50af840ee9dcc7fd9def913187


commit 4cac725437d41d50af840ee9dcc7fd9def913187
Author: Bastiaan Jacques <address@hidden>
Date:   Thu May 29 16:09:45 2014 +0200

    Use map::emplace() instead of map::insert().

diff --git a/libcore/DisplayObject.cpp b/libcore/DisplayObject.cpp
index 3da7a4b..0a2b956 100644
--- a/libcore/DisplayObject.cpp
+++ b/libcore/DisplayObject.cpp
@@ -1621,45 +1621,32 @@ getURIMap(const typename Map::key_compare& cmp)
     const Setter n = nullptr;
 
     Map ret(cmp);
-    ret.insert(std::make_pair(NSV::PROP_uX, GetterSetter(&getX, &setX)));
-    ret.insert(std::make_pair(NSV::PROP_uY, GetterSetter(&getY, &setY)));
-    ret.insert(std::make_pair(NSV::PROP_uXSCALE,
-                GetterSetter(&getScaleX, &setScaleX)));
-    ret.insert(std::make_pair(NSV::PROP_uYSCALE,
-                GetterSetter(&getScaleY, &setScaleY)));
-    ret.insert(std::make_pair(NSV::PROP_uROTATION,
-                GetterSetter(&getRotation, &setRotation)));
-    ret.insert(std::make_pair(NSV::PROP_uHIGHQUALITY,
-                GetterSetter(&getHighQuality, &setHighQuality)));
-    ret.insert(std::make_pair(NSV::PROP_uQUALITY,
-                GetterSetter(&getQuality, &setQuality)));
-    ret.insert(std::make_pair(NSV::PROP_uALPHA,
-                GetterSetter(&getAlpha, &setAlpha)));
-    ret.insert(std::make_pair(NSV::PROP_uWIDTH,
-                GetterSetter(&getWidth, &setWidth)));
-    ret.insert(std::make_pair(NSV::PROP_uHEIGHT,
-                GetterSetter(&getHeight, &setHeight)));
-    ret.insert(std::make_pair(NSV::PROP_uNAME,
-                GetterSetter(&getNameProperty, &setName)));
-    ret.insert(std::make_pair(NSV::PROP_uVISIBLE,
-                GetterSetter(&getVisible, &setVisible)));
-    ret.insert(std::make_pair(NSV::PROP_uSOUNDBUFTIME,
-                GetterSetter(&getSoundBufTime, &setSoundBufTime)));
-    ret.insert(std::make_pair(NSV::PROP_uFOCUSRECT,
-                GetterSetter(&getFocusRect, &setFocusRect)));
-    ret.insert(std::make_pair(NSV::PROP_uDROPTARGET,
-                GetterSetter(&getDropTarget, n)));
-    ret.insert(std::make_pair(NSV::PROP_uCURRENTFRAME,
-                GetterSetter(&getCurrentFrame, n)));
-    ret.insert(std::make_pair(NSV::PROP_uFRAMESLOADED,
-                GetterSetter(&getFramesLoaded, n)));
-    ret.insert(std::make_pair(NSV::PROP_uTOTALFRAMES,
-                GetterSetter(&getTotalFrames, n)));
-    ret.insert(std::make_pair(NSV::PROP_uURL, GetterSetter(&getURL, n)));
-    ret.insert(std::make_pair(NSV::PROP_uTARGET, GetterSetter(&getTarget, n)));
-    ret.insert(std::make_pair(NSV::PROP_uXMOUSE, GetterSetter(&getMouseX, n)));
-    ret.insert(std::make_pair(NSV::PROP_uYMOUSE, GetterSetter(&getMouseY, n)));
-    ret.insert(std::make_pair(NSV::PROP_uPARENT, GetterSetter(&getParent, n)));
+    ret.emplace(NSV::PROP_uX, GetterSetter(&getX, &setX));
+    ret.emplace(NSV::PROP_uY, GetterSetter(&getY, &setY));
+    ret.emplace(NSV::PROP_uXSCALE, GetterSetter(&getScaleX, &setScaleX));
+    ret.emplace(NSV::PROP_uYSCALE, GetterSetter(&getScaleY, &setScaleY));
+    ret.emplace(NSV::PROP_uROTATION, GetterSetter(&getRotation, &setRotation));
+    ret.emplace(NSV::PROP_uHIGHQUALITY,
+                GetterSetter(&getHighQuality, &setHighQuality));
+    ret.emplace(NSV::PROP_uQUALITY, GetterSetter(&getQuality, &setQuality));
+    ret.emplace(NSV::PROP_uALPHA, GetterSetter(&getAlpha, &setAlpha));
+    ret.emplace(NSV::PROP_uWIDTH, GetterSetter(&getWidth, &setWidth));
+    ret.emplace(NSV::PROP_uHEIGHT, GetterSetter(&getHeight, &setHeight));
+    ret.emplace(NSV::PROP_uNAME, GetterSetter(&getNameProperty, &setName));
+    ret.emplace(NSV::PROP_uVISIBLE, GetterSetter(&getVisible, &setVisible));
+    ret.emplace(NSV::PROP_uSOUNDBUFTIME,
+                GetterSetter(&getSoundBufTime, &setSoundBufTime));
+    ret.emplace(NSV::PROP_uFOCUSRECT,
+                GetterSetter(&getFocusRect, &setFocusRect));
+    ret.emplace(NSV::PROP_uDROPTARGET, GetterSetter(&getDropTarget, n));
+    ret.emplace(NSV::PROP_uCURRENTFRAME, GetterSetter(&getCurrentFrame, n));
+    ret.emplace(NSV::PROP_uFRAMESLOADED, GetterSetter(&getFramesLoaded, n));
+    ret.emplace(NSV::PROP_uTOTALFRAMES, GetterSetter(&getTotalFrames, n));
+    ret.emplace(NSV::PROP_uURL, GetterSetter(&getURL, n));
+    ret.emplace(NSV::PROP_uTARGET, GetterSetter(&getTarget, n));
+    ret.emplace(NSV::PROP_uXMOUSE, GetterSetter(&getMouseX, n));
+    ret.emplace(NSV::PROP_uYMOUSE, GetterSetter(&getMouseY, n));
+    ret.emplace(NSV::PROP_uPARENT, GetterSetter(&getParent, n));
     return ret;
 }
 
diff --git a/libcore/SWFMovie.cpp b/libcore/SWFMovie.cpp
index aa9399b..46881cc 100644
--- a/libcore/SWFMovie.cpp
+++ b/libcore/SWFMovie.cpp
@@ -97,7 +97,7 @@ SWFMovie::addCharacter(std::uint16_t id)
 {
     // If a character is already known, we don't want to mark it uninitialized
     // again.
-    _characters.insert(std::make_pair(id, false));
+    _characters.emplace(id, false);
 }
 
 bool
diff --git a/libcore/TextField.cpp b/libcore/TextField.cpp
index f4dab42..a1f1c4a 100644
--- a/libcore/TextField.cpp
+++ b/libcore/TextField.cpp
@@ -2119,7 +2119,7 @@ TextField::parseHTML(std::wstring& tag,
         // Skip attribute closer.
         ++it;
 
-        attributes.insert(std::make_pair(attname, attvalue));
+        attributes.emplace(attname, attvalue);
         attname.clear();
         attvalue.clear();
 
diff --git a/libcore/asobj/LoadableObject.cpp b/libcore/asobj/LoadableObject.cpp
index ca514d5..892a7ed 100644
--- a/libcore/asobj/LoadableObject.cpp
+++ b/libcore/asobj/LoadableObject.cpp
@@ -364,8 +364,7 @@ loadableobject_sendAndLoad(const fn_call& fn)
         if (obj->get_member(NSV::PROP_CONTENT_TYPE, &contentType)) {
             // This should not overwrite anything set in 
             // LoadVars.addRequestHeader();
-            headers.insert(std::make_pair("Content-Type", 
-                        contentType.to_string()));
+            headers.emplace("Content-Type", contentType.to_string());
         }
 
         // Convert the object to a string to send. XML should
diff --git a/libcore/asobj/XML_as.cpp b/libcore/asobj/XML_as.cpp
index a60c3bd..cf4681c 100644
--- a/libcore/asobj/XML_as.cpp
+++ b/libcore/asobj/XML_as.cpp
@@ -218,7 +218,7 @@ XML_as::parseAttribute(XMLNode_as* node, xml_iterator& it,
 
     // This ensures values are not inserted twice, which is expected
     // behaviour
-    attributes.insert(std::make_pair(name, value));
+    attributes.emplace(name, value);
 
 }
 
diff --git a/libcore/movie_root.cpp b/libcore/movie_root.cpp
index 441fe6f..d001516 100644
--- a/libcore/movie_root.cpp
+++ b/libcore/movie_root.cpp
@@ -823,7 +823,7 @@ movie_root::addIntervalTimer(std::unique_ptr<Timer> timer)
 
     std::shared_ptr<Timer> addTimer(timer.release());
 
-    _intervalTimers.insert(std::make_pair(id, addTimer));
+    _intervalTimers.emplace(id, addTimer);
 
     return id;
 }
@@ -1732,7 +1732,7 @@ movie_root::executeTimers()
         else {
             unsigned long elapsed;
             if (timer->expired(now, elapsed)) {
-                expiredTimers.insert(std::make_pair(elapsed, timer));
+                expiredTimers.emplace(elapsed, timer);
             }
         }
 
diff --git a/libcore/parser/SWFMovieDefinition.cpp 
b/libcore/parser/SWFMovieDefinition.cpp
index c827e92..edc934c 100644
--- a/libcore/parser/SWFMovieDefinition.cpp
+++ b/libcore/parser/SWFMovieDefinition.cpp
@@ -176,7 +176,7 @@ void
 SWFMovieDefinition::add_font(int font_id, boost::intrusive_ptr<Font> f)
 {
     assert(f);
-    m_fonts.insert(std::make_pair(font_id, f));
+    m_fonts.emplace(font_id, f);
 }
 
 Font*
@@ -215,7 +215,7 @@ void
 SWFMovieDefinition::addBitmap(int id, boost::intrusive_ptr<CachedBitmap> im)
 {
     assert(im);
-    _bitmaps.insert(std::make_pair(id, im));
+    _bitmaps.emplace(id, im);
 }
 
 sound_sample*
@@ -237,8 +237,7 @@ SWFMovieDefinition::add_sound_sample(int id, sound_sample* 
sam)
     log_parse(_("Add sound sample %d assigning id %d"),
         id, sam->m_sound_handler_id);
     )
-    m_sound_samples.insert(std::make_pair(id,
-                boost::intrusive_ptr<sound_sample>(sam)));
+    m_sound_samples.emplace(id, boost::intrusive_ptr<sound_sample>(sam));
 }
 
 // Read header and assign url
@@ -568,7 +567,7 @@ SWFMovieDefinition::add_frame_name(const std::string& n)
 {
     std::lock_guard<std::mutex> lock1(_namedFramesMutex);
 
-    _namedFrames.insert(std::make_pair(n, _frames_loaded.load()));
+    _namedFrames.emplace(n, _frames_loaded.load());
 }
 
 bool
diff --git a/libcore/parser/sprite_definition.cpp 
b/libcore/parser/sprite_definition.cpp
index 75796fe..81e89e3 100644
--- a/libcore/parser/sprite_definition.cpp
+++ b/libcore/parser/sprite_definition.cpp
@@ -94,7 +94,7 @@ sprite_definition::add_frame_name(const std::string& name)
 
     // It's fine for loaded frames to exceed frame count. Should be
     // adjusted at the end of parsing.
-    _namedFrames.insert(std::make_pair(name, m_loading_frame));
+    _namedFrames.emplace(name, m_loading_frame);
 }
 
 bool
diff --git a/libcore/swf/DefineFontTag.cpp b/libcore/swf/DefineFontTag.cpp
index 94988e5..cd8d269 100644
--- a/libcore/swf/DefineFontTag.cpp
+++ b/libcore/swf/DefineFontTag.cpp
@@ -69,7 +69,7 @@ DefineFontTag::readCodeTable(SWFStream& in, Font::CodeTable& 
table,
         // Code table is made of std::uint16_t's.
         for (size_t i=0; i < glyphCount; ++i) {
             const std::uint16_t code = in.read_u16();
-            table.insert(std::make_pair(code, i));
+            table.emplace(code, i);
         }
     }
     else {
@@ -77,7 +77,7 @@ DefineFontTag::readCodeTable(SWFStream& in, Font::CodeTable& 
table,
         in.ensureBytes(1 * glyphCount);
         for (size_t i = 0; i < glyphCount; ++i) {
             const std::uint8_t code = in.read_u8();
-            table.insert(std::make_pair(code, i));
+            table.emplace(code, i);
         }
     }
 }
@@ -319,7 +319,7 @@ DefineFontTag::readDefineFont2Or3(SWFStream& in, 
movie_definition& m,
 
             // Remember this adjustment; we can look it up quickly
             // later using the DisplayObject pair as the key.
-            if (!_kerningPairs.insert(std::make_pair(k, adjustment)).second) {
+            if (!_kerningPairs.emplace(k, adjustment).second) {
                 IF_VERBOSE_MALFORMED_SWF(
                     log_swferror(_("Repeated kerning pair found - ignoring"));
                 );
diff --git a/libcore/swf/TagLoadersTable.cpp b/libcore/swf/TagLoadersTable.cpp
index a3c9bf5..14ad36a 100644
--- a/libcore/swf/TagLoadersTable.cpp
+++ b/libcore/swf/TagLoadersTable.cpp
@@ -42,7 +42,7 @@ bool
 TagLoadersTable::registerLoader(SWF::TagType t, TagLoader lf)
 {
        assert(lf);
-    return _loaders.insert(std::make_pair(t, lf)).second;
+    return _loaders.emplace(t, lf).second;
 }
 
 } // namespace gnash::SWF
diff --git a/libmedia/FLVParser.cpp b/libmedia/FLVParser.cpp
index 2e984a0..35ec474 100644
--- a/libmedia/FLVParser.cpp
+++ b/libmedia/FLVParser.cpp
@@ -443,7 +443,7 @@ FLVParser::parseNextTag(bool index_only)
                }
 
                std::lock_guard<std::mutex> lock(_metaTagsMutex);
-               _metaTags.insert(std::make_pair(flvtag.timestamp, 
std::move(metaTag)));
+               _metaTags.emplace(flvtag.timestamp, std::move(metaTag));
        }
        else
        {
diff --git a/plugin/npapi/plugin.cpp b/plugin/npapi/plugin.cpp
index 3c6f423..1c954b8 100644
--- a/plugin/npapi/plugin.cpp
+++ b/plugin/npapi/plugin.cpp
@@ -1432,7 +1432,7 @@ nsPluginInstance::startProc()
                          _childpid);
 
         if (!cookiefile.empty()) {
-            cookiemap.insert(std::make_pair(_childpid, cookiefile));
+            cookiemap.emplace(_childpid, cookiefile);
             gnash::log_debug("Pid %d associated with cookiefile %s",
                 _childpid, cookiefile);
         }
diff --git a/utilities/rtmpget.cpp b/utilities/rtmpget.cpp
index 08b8845..2725ba5 100644
--- a/utilities/rtmpget.cpp
+++ b/utilities/rtmpget.cpp
@@ -113,7 +113,7 @@ public:
     }
 
     void queueCall(size_t n, const std::string& call) {
-        _calls.insert(std::make_pair(n, call));
+        _calls.emplace(n, call);
     }
 
     std::string getCall(size_t n) {

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

Summary of changes:
 libcore/DisplayObject.cpp             |   65 +++++++++++++--------------------
 libcore/SWFMovie.cpp                  |    2 +-
 libcore/TextField.cpp                 |    2 +-
 libcore/asobj/LoadableObject.cpp      |    3 +-
 libcore/asobj/XML_as.cpp              |    2 +-
 libcore/movie_root.cpp                |    4 +-
 libcore/parser/SWFMovieDefinition.cpp |    9 ++---
 libcore/parser/sprite_definition.cpp  |    2 +-
 libcore/swf/DefineFontTag.cpp         |    6 ++--
 libcore/swf/TagLoadersTable.cpp       |    2 +-
 libmedia/FLVParser.cpp                |    2 +-
 plugin/npapi/plugin.cpp               |    2 +-
 utilities/rtmpget.cpp                 |    2 +-
 13 files changed, 44 insertions(+), 59 deletions(-)


hooks/post-receive
-- 
Gnash



reply via email to

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