| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 #define DISALLOW_COPY_AND_ASSIGN(TypeName) \ | 97 #define DISALLOW_COPY_AND_ASSIGN(TypeName) \ |
| 98 TypeName(const TypeName&); \ | 98 TypeName(const TypeName&); \ |
| 99 void operator=(const TypeName&) | 99 void operator=(const TypeName&) |
| 100 | 100 |
| 101 // A macro to disallow all the implicit constructors, namely the | 101 // A macro to disallow all the implicit constructors, namely the |
| 102 // default constructor, copy constructor and operator= functions. | 102 // default constructor, copy constructor and operator= functions. |
| 103 // | 103 // |
| 104 // This should be used in the private: declarations for a class | 104 // This should be used in the private: declarations for a class |
| 105 // that wants to prevent anyone from instantiating it. This is | 105 // that wants to prevent anyone from instantiating it. This is |
| 106 // especially useful for classes containing only static methods. | 106 // especially useful for classes containing only static methods. |
| 107 #ifndef DISALLOW_IMPLICIT_CONSTRUCTORS | |
| 108 #define DISALLOW_IMPLICIT_CONSTRUCTORS(TypeName) \ | 107 #define DISALLOW_IMPLICIT_CONSTRUCTORS(TypeName) \ |
| 109 TypeName() = delete; \ | 108 TypeName() = delete; \ |
| 110 DISALLOW_COPY_AND_ASSIGN(TypeName) | 109 DISALLOW_COPY_AND_ASSIGN(TypeName) |
| 111 #endif // DISALLOW_IMPLICIT_CONSTRUCTORS | |
| 112 | 110 |
| 113 namespace WTF { | 111 namespace WTF { |
| 114 | 112 |
| 115 namespace double_conversion { | 113 namespace double_conversion { |
| 116 | 114 |
| 117 static const int kCharSize = sizeof(char); | 115 static const int kCharSize = sizeof(char); |
| 118 | 116 |
| 119 // Returns the maximum of the two parameters. | 117 // Returns the maximum of the two parameters. |
| 120 template <typename T> | 118 template <typename T> |
| 121 static T Max(T a, T b) { | 119 static T Max(T a, T b) { |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 template <class Dest, class Source> | 298 template <class Dest, class Source> |
| 301 inline Dest BitCast(Source* source) { | 299 inline Dest BitCast(Source* source) { |
| 302 return BitCast<Dest>(reinterpret_cast<uintptr_t>(source)); | 300 return BitCast<Dest>(reinterpret_cast<uintptr_t>(source)); |
| 303 } | 301 } |
| 304 | 302 |
| 305 } // namespace double_conversion | 303 } // namespace double_conversion |
| 306 | 304 |
| 307 } // namespace WTF | 305 } // namespace WTF |
| 308 | 306 |
| 309 #endif // DOUBLE_CONVERSION_UTILS_H_ | 307 #endif // DOUBLE_CONVERSION_UTILS_H_ |
| OLD | NEW |