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

Unified Diff: src/core/SkDebug.cpp

Issue 187653003: Add size_t bytesWritten() const to SkWStream. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add and use SkToSizeT Created 6 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 side-by-side diff with in-line comments
Download patch
Index: src/core/SkDebug.cpp
diff --git a/src/core/SkDebug.cpp b/src/core/SkDebug.cpp
index d484f5eaffe24f114f234df60c882f7b1f9bce71..b705a650ea2ce237ffef6a0f9d39b252052f9aab 100644
--- a/src/core/SkDebug.cpp
+++ b/src/core/SkDebug.cpp
@@ -51,4 +51,9 @@ unsigned SkToUInt(uintmax_t x) {
return (unsigned)x;
}
+size_t SkToSizeT(uintmax_t x) {
+ SkASSERT((size_t)x == x);
+ return (size_t)x;
+}
+
#endif
« no previous file with comments | « include/core/SkTypes.h ('k') | src/core/SkStream.cpp » ('j') | src/core/SkStream.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698