[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-2083-g223b921 |
Date: |
Fri, 30 May 2014 00:47:58 -0600 |
On Thu, May 29, 2014 at 7:31 AM, Bastiaan Jacques <address@hidden> wrote:
>
> commit e36e91e887f67bed92b1356564b178360b245e0d
> Author: Bastiaan Jacques <address@hidden>
> Date: Thu May 29 15:09:44 2014 +0200
>
> Given Container<T>, replace push_back(T(...)) with emplace_back(...).
>
> This allows the optimizer to do a better job.
>
> diff --git a/libcore/Geometry.h b/libcore/Geometry.h
> index 6926708..c86f707 100644
> --- a/libcore/Geometry.h
> +++ b/libcore/Geometry.h
> @@ -330,7 +330,7 @@ public:
> void
> drawLineTo(std::int32_t dx, std::int32_t dy)
> {
> - m_edges.push_back(Edge(dx, dy, dx, dy));
> + m_edges.emplace_back(dx, dy, dx, dy);
> }
This looks like a terribly short line, length = 0. Do we have a
position to start or continue drawing from, on our way to the point
(dx, dy)?
I'm not suggesting this is a regression. Obviously the code already
did this. You have just made it do it more elegantly.