Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(39)

Side by Side Diff: third_party/WebKit/Source/core/animation/animatable/AnimatableLengthBox.h

Issue 2761693002: Wrapped PassRefPtrs in move where passed to RefPtr constructor. (Closed)
Patch Set: Added move wraps for multiple instances in 1 line. Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 protected: 54 protected:
55 PassRefPtr<AnimatableValue> interpolateTo(const AnimatableValue*, 55 PassRefPtr<AnimatableValue> interpolateTo(const AnimatableValue*,
56 double fraction) const override; 56 double fraction) const override;
57 bool usesDefaultInterpolationWith(const AnimatableValue*) const final; 57 bool usesDefaultInterpolationWith(const AnimatableValue*) const final;
58 58
59 private: 59 private:
60 AnimatableLengthBox(PassRefPtr<AnimatableValue> left, 60 AnimatableLengthBox(PassRefPtr<AnimatableValue> left,
61 PassRefPtr<AnimatableValue> right, 61 PassRefPtr<AnimatableValue> right,
62 PassRefPtr<AnimatableValue> top, 62 PassRefPtr<AnimatableValue> top,
63 PassRefPtr<AnimatableValue> bottom) 63 PassRefPtr<AnimatableValue> bottom)
64 : m_left(left), m_right(right), m_top(top), m_bottom(bottom) {} 64 : m_left(std::move(left)),
65 m_right(std::move(right)),
66 m_top(std::move(top)),
67 m_bottom(std::move(bottom)) {}
65 AnimatableType type() const override { return TypeLengthBox; } 68 AnimatableType type() const override { return TypeLengthBox; }
66 bool equalTo(const AnimatableValue*) const override; 69 bool equalTo(const AnimatableValue*) const override;
67 70
68 RefPtr<AnimatableValue> m_left; 71 RefPtr<AnimatableValue> m_left;
69 RefPtr<AnimatableValue> m_right; 72 RefPtr<AnimatableValue> m_right;
70 RefPtr<AnimatableValue> m_top; 73 RefPtr<AnimatableValue> m_top;
71 RefPtr<AnimatableValue> m_bottom; 74 RefPtr<AnimatableValue> m_bottom;
72 }; 75 };
73 76
74 DEFINE_ANIMATABLE_VALUE_TYPE_CASTS(AnimatableLengthBox, isLengthBox()); 77 DEFINE_ANIMATABLE_VALUE_TYPE_CASTS(AnimatableLengthBox, isLengthBox());
75 78
76 } // namespace blink 79 } // namespace blink
77 80
78 #endif // AnimatableLengthBox_h 81 #endif // AnimatableLengthBox_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698