| Index: third_party/WebKit/Source/wtf/TypeTraits.cpp
|
| diff --git a/third_party/WebKit/Source/wtf/TypeTraits.cpp b/third_party/WebKit/Source/wtf/TypeTraits.cpp
|
| index fe757fab93df12a7fad39d3752b20c4311a47d21..a09486df9b2abf54c9ca0a74b8de59f423747e1d 100644
|
| --- a/third_party/WebKit/Source/wtf/TypeTraits.cpp
|
| +++ b/third_party/WebKit/Source/wtf/TypeTraits.cpp
|
| @@ -1,4 +1,4 @@
|
| - /*
|
| +/*
|
| * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
|
| * Copyright (C) 2009, 2010 Google Inc. All rights reserved.
|
| *
|
| @@ -92,52 +92,54 @@ static_assert(IsPod<double>::value, "double should be a POD");
|
| static_assert(IsPod<long double>::value, "long double should be a POD");
|
| static_assert(IsPod<float>::value, "float should be a POD");
|
| struct VirtualClass {
|
| - virtual void A() { }
|
| + virtual void A() {}
|
| };
|
| static_assert(!IsTriviallyMoveAssignable<VirtualClass>::value, "VirtualClass should not be trivially move assignable");
|
| static_assert(!IsScalar<VirtualClass>::value, "classes should not be scalar");
|
| static_assert(IsScalar<VirtualClass*>::value, "pointers to classes should be scalar");
|
|
|
| struct DestructorClass {
|
| - ~DestructorClass() { }
|
| + ~DestructorClass() {}
|
| };
|
| static_assert(IsTriviallyMoveAssignable<DestructorClass>::value, "DestructorClass should be trivially move assignable");
|
| static_assert(IsTriviallyCopyAssignable<DestructorClass>::value, "DestructorClass should be trivially copy assignable");
|
| static_assert(IsTriviallyDefaultConstructible<DestructorClass>::value, "DestructorClass should have a trivial default constructor");
|
|
|
| struct MixedPrivate {
|
| - int M2() { return m2; }
|
| - int m1;
|
| -private:
|
| - int m2;
|
| + int M2() { return m2; }
|
| + int m1;
|
| +
|
| + private:
|
| + int m2;
|
| };
|
| static_assert(IsTriviallyMoveAssignable<MixedPrivate>::value, "MixedPrivate should be trivially move assignable");
|
| static_assert(IsTriviallyCopyAssignable<MixedPrivate>::value, "MixedPrivate should be trivially copy assignable");
|
| static_assert(IsTriviallyDefaultConstructible<MixedPrivate>::value, "MixedPrivate should have a trivial default constructor");
|
| struct JustPrivate {
|
| - int M2() { return m2; }
|
| -private:
|
| - int m2;
|
| + int M2() { return m2; }
|
| +
|
| + private:
|
| + int m2;
|
| };
|
| static_assert(IsTriviallyMoveAssignable<JustPrivate>::value, "JustPrivate should be trivially move assignable");
|
| static_assert(IsTriviallyCopyAssignable<JustPrivate>::value, "JustPrivate should be trivially copy assignable");
|
| static_assert(IsTriviallyDefaultConstructible<JustPrivate>::value, "JustPrivate should have a trivial default constructor");
|
| struct JustPublic {
|
| - int m2;
|
| + int m2;
|
| };
|
| static_assert(IsTriviallyMoveAssignable<JustPublic>::value, "JustPublic should be trivially move assignable");
|
| static_assert(IsTriviallyCopyAssignable<JustPublic>::value, "JustPublic should be trivially copy assignable");
|
| static_assert(IsTriviallyDefaultConstructible<JustPublic>::value, "JustPublic should have a trivial default constructor");
|
| struct NestedInherited : public JustPublic, JustPrivate {
|
| - float m3;
|
| + float m3;
|
| };
|
| static_assert(IsTriviallyMoveAssignable<NestedInherited>::value, "NestedInherited should be trivially move assignable");
|
| static_assert(IsTriviallyCopyAssignable<NestedInherited>::value, "NestedInherited should be trivially copy assignable");
|
| static_assert(IsTriviallyDefaultConstructible<NestedInherited>::value, "NestedInherited should have a trivial default constructor");
|
| struct NestedOwned {
|
| - JustPublic m1;
|
| - JustPrivate m2;
|
| - float m3;
|
| + JustPublic m1;
|
| + JustPrivate m2;
|
| + float m3;
|
| };
|
|
|
| static_assert(IsTriviallyMoveAssignable<NestedOwned>::value, "NestedOwned should be trivially move assignable");
|
| @@ -145,15 +147,15 @@ static_assert(IsTriviallyCopyAssignable<NestedOwned>::value, "NestedOwned should
|
| static_assert(IsTriviallyDefaultConstructible<NestedOwned>::value, "NestedOwned should have a trivial default constructor");
|
|
|
| class NonCopyableClass {
|
| - WTF_MAKE_NONCOPYABLE(NonCopyableClass);
|
| + WTF_MAKE_NONCOPYABLE(NonCopyableClass);
|
| };
|
| -#if 0 // Compilers don't get this "right" yet if using = delete.
|
| +#if 0 // Compilers don't get this "right" yet if using = delete.
|
| static_assert(!IsTriviallyMoveAssignable<NonCopyableClass>::value, "NonCopyableClass should not be trivially move assignable");
|
| static_assert(!IsTriviallyCopyAssignable<NonCopyableClass>::value, "NonCopyableClass should not be trivially copy assignable");
|
| static_assert(IsTriviallyDefaultConstructible<NonCopyableClass>::value, "NonCopyableClass should have a trivial default constructor");
|
| -#endif // 0
|
| +#endif // 0
|
|
|
| -enum IsConvertibleToIntegerCheck { };
|
| +enum IsConvertibleToIntegerCheck {};
|
| static_assert(IsConvertibleToInteger<IsConvertibleToIntegerCheck>::value, "enum should be convertible to integer");
|
| static_assert(IsConvertibleToInteger<bool>::value, "bool should be convertible to integer");
|
| static_assert(IsConvertibleToInteger<char>::value, "char should be convertible to integer");
|
| @@ -225,7 +227,6 @@ static_assert((IsSameType<int, RemoveReference<int>::Type>::value), "RemoveRefer
|
| static_assert((IsSameType<int, RemoveReference<int&>::Type>::value), "RemoveReference should produce the corresponding non-reference type");
|
| static_assert((IsSameType<int, RemoveReference<int&&>::Type>::value), "RemoveReference should produce the corresponding non-reference type");
|
|
|
| -
|
| typedef int IntArray[];
|
| typedef int IntArraySized[4];
|
|
|
| @@ -235,4 +236,4 @@ static_assert((IsArray<IntArraySized>::value), "IsArray should recognize sized a
|
| static_assert((IsSameType<int, RemoveExtent<IntArray>::Type>::value), "RemoveExtent should return the array element type of an array");
|
| static_assert((IsSameType<int, RemoveExtent<IntArraySized>::Type>::value), "RemoveExtent should return the array element type of a sized array");
|
|
|
| -} // namespace WTF
|
| +} // namespace WTF
|
|
|