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

Unified Diff: cc/resources/resource_util.h

Issue 1900053002: cc: Use std::is_same in resource_util.h. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/resource_util.h
diff --git a/cc/resources/resource_util.h b/cc/resources/resource_util.h
index 68a4aa59fa9fe57e112d166b51251b32238404e5..51cda02d499d374eb89b1bd918ae194f00271aa2 100644
--- a/cc/resources/resource_util.h
+++ b/cc/resources/resource_util.h
@@ -55,18 +55,6 @@ class CC_EXPORT ResourceUtil {
ResourceFormat format);
private:
- // TODO(prashant.n): Replace IsSameType with std::is_same once C++11 is used
- // on all platforms.
- template <typename T, typename U>
- struct IsSameType {
- static const bool value = false;
- };
-
- template <typename T>
- struct IsSameType<T, T> {
- static const bool value = true;
- };
-
template <typename T>
static inline void VerifyType();
@@ -161,7 +149,7 @@ T ResourceUtil::UncheckedSizeInBytesAligned(const gfx::Size& size,
template <typename T>
void ResourceUtil::VerifyType() {
static_assert(
- std::numeric_limits<T>::is_integer && !IsSameType<T, bool>::value,
+ std::numeric_limits<T>::is_integer && !std::is_same<T, bool>::value,
"T must be non-bool integer type. Preferred type is size_t.");
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698