From 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Tue, 27 Jun 2017 06:07:23 +0000 Subject: webkitgtk-2.16.5 --- Source/WebCore/Modules/geolocation/Geoposition.h | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) (limited to 'Source/WebCore/Modules/geolocation/Geoposition.h') diff --git a/Source/WebCore/Modules/geolocation/Geoposition.h b/Source/WebCore/Modules/geolocation/Geoposition.h index 27064dddf..cfcf319dc 100644 --- a/Source/WebCore/Modules/geolocation/Geoposition.h +++ b/Source/WebCore/Modules/geolocation/Geoposition.h @@ -23,8 +23,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef Geoposition_h -#define Geoposition_h +#pragma once #include "Coordinates.h" #include "Event.h" @@ -35,31 +34,28 @@ namespace WebCore { class Geoposition : public RefCounted { public: - static PassRefPtr create(PassRefPtr coordinates, DOMTimeStamp timestamp) + static Ref create(Ref&& coordinates, DOMTimeStamp timestamp) { - return adoptRef(new Geoposition(coordinates, timestamp)); + return adoptRef(*new Geoposition(WTFMove(coordinates), timestamp)); } - PassRefPtr isolatedCopy() const + Ref isolatedCopy() const { - return Geoposition::create(m_coordinates->isolatedCopy(), m_timestamp); + return create(m_coordinates->isolatedCopy(), m_timestamp); } DOMTimeStamp timestamp() const { return m_timestamp; } - Coordinates* coords() const { return m_coordinates.get(); } + const Coordinates& coords() const { return m_coordinates.get(); } private: - Geoposition(PassRefPtr coordinates, DOMTimeStamp timestamp) - : m_coordinates(coordinates) + Geoposition(Ref&& coordinates, DOMTimeStamp timestamp) + : m_coordinates(WTFMove(coordinates)) , m_timestamp(timestamp) { - ASSERT(m_coordinates); } - RefPtr m_coordinates; + Ref m_coordinates; DOMTimeStamp m_timestamp; }; } // namespace WebCore - -#endif // Geoposition_h -- cgit v1.2.1