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

Side by Side Diff: third_party/WebKit/Source/core/animation/InterpolableValue.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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef InterpolableValue_h 5 #ifndef InterpolableValue_h
6 #define InterpolableValue_h 6 #define InterpolableValue_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "core/animation/animatable/AnimatableValue.h" 9 #include "core/animation/animatable/AnimatableValue.h"
10 #include "platform/heap/Handle.h" 10 #include "platform/heap/Handle.h"
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 NOTREACHED(); 157 NOTREACHED();
158 } 158 }
159 159
160 private: 160 private:
161 void interpolate(const InterpolableValue& to, 161 void interpolate(const InterpolableValue& to,
162 const double progress, 162 const double progress,
163 InterpolableValue& result) const final; 163 InterpolableValue& result) const final;
164 RefPtr<AnimatableValue> m_value; 164 RefPtr<AnimatableValue> m_value;
165 165
166 InterpolableAnimatableValue(PassRefPtr<AnimatableValue> value) 166 InterpolableAnimatableValue(PassRefPtr<AnimatableValue> value)
167 : m_value(value) {} 167 : m_value(std::move(value)) {}
168 }; 168 };
169 169
170 DEFINE_TYPE_CASTS(InterpolableNumber, 170 DEFINE_TYPE_CASTS(InterpolableNumber,
171 InterpolableValue, 171 InterpolableValue,
172 value, 172 value,
173 value->isNumber(), 173 value->isNumber(),
174 value.isNumber()); 174 value.isNumber());
175 DEFINE_TYPE_CASTS(InterpolableList, 175 DEFINE_TYPE_CASTS(InterpolableList,
176 InterpolableValue, 176 InterpolableValue,
177 value, 177 value,
178 value->isList(), 178 value->isList(),
179 value.isList()); 179 value.isList());
180 DEFINE_TYPE_CASTS(InterpolableAnimatableValue, 180 DEFINE_TYPE_CASTS(InterpolableAnimatableValue,
181 InterpolableValue, 181 InterpolableValue,
182 value, 182 value,
183 value->isAnimatableValue(), 183 value->isAnimatableValue(),
184 value.isAnimatableValue()); 184 value.isAnimatableValue());
185 185
186 } // namespace blink 186 } // namespace blink
187 187
188 #endif 188 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698