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

Unified Diff: include/core/SkTemplates.h

Issue 18503009: Fix SkTFits in to work properly with signed/unsigned mixtures. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Address comments by adding comments and assertions. Created 7 years, 5 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
« no previous file with comments | « gyp/utils.gyp ('k') | src/ports/SkOSFile_posix.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkTemplates.h
===================================================================
--- include/core/SkTemplates.h (revision 9972)
+++ include/core/SkTemplates.h (working copy)
@@ -64,13 +64,6 @@
);
}
-/** Returns true if the source value 's' will fit in the destination type 'D'. */
-template <typename D, typename S> inline bool SkTFitsIn(S s) {
- // the cast to <S> is just to restore the signedness of S, to avoid
- // sign-unsigned comparison warnings.
- return static_cast<S>(static_cast<D>(s)) == s;
-}
-
/** \class SkAutoTCallVProc
Call a function when this goes out of scope. The template uses two
« no previous file with comments | « gyp/utils.gyp ('k') | src/ports/SkOSFile_posix.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698