diff options
author | bungeman <bungeman@google.com> | 2016-01-05 14:59:40 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-01-05 14:59:40 -0800 |
commit | 221524de3be1fc343ad328c5e99562f32b5cad9c (patch) | |
tree | d9b791db0ff48921388d2b7443fd5fc58f0b9583 /src/core/SkFindAndPlaceGlyph.h | |
parent | 3c1468188924ede1e6589cddee84031c16782226 (diff) |
Start using <type_traits> and <utility> (C++11).
SkUtility.h and SkTLogic.h implement a number of type traits now
available through <type_traits> and <utility>. This removes SkUtility.h,
replacing it with <utility>, and moves a number of traits in
SkTLogic.h to use the std:: equivelents. This change only uses C++11
parts of the standard library; SkTLogic.h will continue to provide
C++14 and beyond for now in the skstd namespace.
The changes to SkTLogic.h are being done gradually so that safe changes
may be landed confidently, with more risky changes in the future.
Review URL: https://codereview.chromium.org/1561683002
Diffstat (limited to 'src/core/SkFindAndPlaceGlyph.h')
-rw-r--r-- | src/core/SkFindAndPlaceGlyph.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/core/SkFindAndPlaceGlyph.h b/src/core/SkFindAndPlaceGlyph.h index bd6338d587..c74a9820e4 100644 --- a/src/core/SkFindAndPlaceGlyph.h +++ b/src/core/SkFindAndPlaceGlyph.h @@ -14,6 +14,7 @@ #include "SkPaint.h" #include "SkTemplates.h" #include "SkUtils.h" +#include <utility> // Calculate a type with the same size as the max of all the Ts. // This must be top level because the is no specialization of inner classes. @@ -91,7 +92,7 @@ private: #define alignof __alignof #endif SkASSERT(alignof(Variant) <= alignof(Space)); - new(&fSpace) Variant(skstd::forward<Args>(args)...); + new(&fSpace) Variant(std::forward<Args>(args)...); } private: @@ -609,7 +610,7 @@ inline void SkFindAndPlaceGlyph::ProcessPosText( SkPoint mappedPoint = mapper.TranslationMapper::map( positions.HorizontalPositions::nextPoint()); positioner.Positioner::findAndPositionGlyph( - &cursor, mappedPoint, skstd::forward<ProcessOneGlyph>(processOneGlyph)); + &cursor, mappedPoint, std::forward<ProcessOneGlyph>(processOneGlyph)); } return; } @@ -681,7 +682,7 @@ inline void SkFindAndPlaceGlyph::ProcessPosText( while (text < stop) { SkPoint mappedPoint = mapper->map(positionReader->nextPoint()); findAndPosition->findAndPositionGlyph( - &text, mappedPoint, skstd::forward<ProcessOneGlyph>(processOneGlyph)); + &text, mappedPoint, std::forward<ProcessOneGlyph>(processOneGlyph)); } } @@ -725,7 +726,7 @@ inline void SkFindAndPlaceGlyph::ProcessText( while (text < stop) { current = findAndPosition->findAndPositionGlyph( - &text, current, skstd::forward<ProcessOneGlyph>(processOneGlyph)); + &text, current, std::forward<ProcessOneGlyph>(processOneGlyph)); } } |