gnash-commit
[Top][All Lists]
Advanced

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

Re: [Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_fi


From: Richard Wilbur
Subject: Re: [Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-2092-g36b1a2f
Date: Mon, 2 Jun 2014 19:51:01 -0600

On Mon, Jun 2, 2014 at 11:30 AM, Bastiaan Jacques <address@hidden> wrote:
>
>
> On Sun, 1 Jun 2014, Richard Wilbur wrote:
>
> Because I simply overlooked it. Well spotted!

Glad to help!  Wish I could help with more code contributions.

>
>> I presume the main reason for not changing the other objects presently
>> passed by const reference is that they aren't movable?
>
>
> Only one object is passed to this particular constructor, that I can
> see.

You're right concerning this constructor.  I was referring to several
subsequent constructors in the patch, such as 'const as_value& value'
in the libcore/Property.h:Property constructor.  Similar in
libcore/as_object.h:Trigger([...], const as_value& customArg),
libcore/asobj/Array_as.cpp:as_value_prop([...], const as_object& o),
librender/agg/Renderer_agg_style.h:GradientStyle(const GradientFill&
fs, [...]), BitmapStyle([...],  const SWFMatrix& mat, [...])

diff --git a/libcore/Property.h b/libcore/Property.h
index 8b3c991..6c1fd56 100644
--- a/libcore/Property.h
+++ b/libcore/Property.h
@@ -289,32 +289,32 @@ class Property

 public:

-       Property(const ObjectURI& uri, const as_value& value,
-            const PropFlags& flags)
+       Property(ObjectURI uri, const as_value& value,
+            PropFlags flags)
         :
         _bound(value),
-               _uri(uri),
-               _flags(flags),
+               _uri(std::move(uri)),
+               _flags(std::move(flags)),
         _destructive(false)
        {}

[...]
diff --git a/libcore/as_object.h b/libcore/as_object.h
index 35a9474..585b311 100644
--- a/libcore/as_object.h
+++ b/libcore/as_object.h
@@ -60,10 +60,10 @@ class Trigger
 {
 public:

-    Trigger(const std::string& propname, as_function& trig,
+    Trigger(std::string propname, as_function& trig,
             const as_value& customArg)
         :
-        _propname(propname),
+        _propname(std::move(propname)),
         _func(&trig),
         _customArg(customArg),
         _executing(false),
diff --git a/libcore/asobj/Array_as.cpp b/libcore/asobj/Array_as.cpp
index 8e2b713..c123fee 100644
--- a/libcore/asobj/Array_as.cpp
+++ b/libcore/asobj/Array_as.cpp
@@ -711,8 +711,8 @@ public:
     // Note: cmpfn must implement a strict weak ordering
     as_value_prop(ObjectURI name, as_cmp_fn cmpfn, const as_object& o)
         :
-        _comp(cmpfn),
-        _prop(name),
+        _comp(std::move(cmpfn)),
+        _prop(std::move(name)),
         _obj(o)
     {
     }

[...]
diff --git a/librender/agg/Renderer_agg_
style.h b/librender/agg/Renderer_agg_style.h
index 9c2d197..16e177b 100644
--- a/librender/agg/Renderer_agg_style.h
+++ b/librender/agg/Renderer_agg_style.h
@@ -242,14 +242,14 @@ class GradientStyle : public AggStyle
 public:

     GradientStyle(const GradientFill& fs, const SWFMatrix& mat,
-            const SWFCxForm& cx, int norm_size, GradientType gr =
GradientType())
+            SWFCxForm cx, int norm_size, GradientType gr = GradientType())
         :
         AggStyle(false),
-        m_cx(cx),
+        m_cx(std::move(cx)),
         m_tr(mat.a() / 65536.0, mat.b() / 65536.0, mat.c() / 65536.0,
               mat.d() / 65536.0, mat.tx(), mat.ty()),
         m_span_interpolator(m_tr),
-        m_gradient_adaptor(gr),
+        m_gradient_adaptor(std::move(gr)),
         m_sg(m_span_interpolator, m_gradient_adaptor, m_gradient_lut, 0,
                 norm_size),

@@ -365,10 +365,10 @@ class BitmapStyle : public AggStyle
 public:

   BitmapStyle(int width, int height, int rowlen, std::uint8_t* data,
-    const SWFMatrix& mat, const SWFCxForm& cx)
+    const SWFMatrix& mat, SWFCxForm cx)
     :
     AggStyle(false),
-    m_cx(cx),
+    m_cx(std::move(cx)),
     m_rbuf(data, width, height, rowlen),
     m_pixf(m_rbuf),
     m_img_src(m_pixf),

In these last two, the patch doesn't reveal enough context to show how
GradientStyle constructor is making use of 'const GradientFill& fs' or
how BitmapStyle constructor is using 'const SWFMatrix& mat'.

Sincerely,
Richard



reply via email to

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