Reverse swap order in DirectWrite typeface.
C++ forbids temporaries to bind to non-const references.
VC++ allows you to do so anyway, but it makes clang on Windows sad.
R=reed@google.com
Author: bungeman@google.com
Review URL: https://codereview.chromium.org/487533004
diff --git a/src/ports/SkTypeface_win_dw.cpp b/src/ports/SkTypeface_win_dw.cpp
index 2387def..566f3d1 100644
--- a/src/ports/SkTypeface_win_dw.cpp
+++ b/src/ports/SkTypeface_win_dw.cpp
@@ -304,7 +304,7 @@
}
}
- glyphToUnicode->swap(SkTDArray<SkUnichar>(glyphToUni, maxGlyph + 1));
+ SkTDArray<SkUnichar>(glyphToUni, maxGlyph + 1).swap(*glyphToUnicode);
}
static bool getWidthAdvance(IDWriteFontFace* fontFace, int gId, int16_t* advance) {