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

Side by Side Diff: third_party/WebKit/Source/wtf/StdLibExtras.h

Issue 2752293004: Move files in wtf/ to platform/wtf/ (Part 5). (Closed)
Patch Set: Rebase. Created 3 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 char (&ArrayLengthHelperFunction(T (&)[Size]))[Size]; 256 char (&ArrayLengthHelperFunction(T (&)[Size]))[Size];
257 // GCC needs some help to deduce a 0 length array. 257 // GCC needs some help to deduce a 0 length array.
258 #if COMPILER(GCC) 258 #if COMPILER(GCC)
259 template <typename T> 259 template <typename T>
260 char (&ArrayLengthHelperFunction(T (&)[0]))[0]; 260 char (&ArrayLengthHelperFunction(T (&)[0]))[0];
261 #endif 261 #endif
262 #define WTF_ARRAY_LENGTH(array) sizeof(::WTF::ArrayLengthHelperFunction(array)) 262 #define WTF_ARRAY_LENGTH(array) sizeof(::WTF::ArrayLengthHelperFunction(array))
263 263
264 } // namespace WTF 264 } // namespace WTF
265 265
266 // This version of placement new omits a 0 check.
267 enum NotNullTag { NotNull };
268 inline void* operator new(size_t, NotNullTag, void* location) {
269 DCHECK(location);
270 return location;
271 }
272
273 using WTF::bitwiseCast; 266 using WTF::bitwiseCast;
274 using WTF::safeCast; 267 using WTF::safeCast;
275 268
276 #endif // WTF_StdLibExtras_h 269 #endif // WTF_StdLibExtras_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/wtf/Allocator.h ('k') | third_party/WebKit/Source/wtf/text/icu/CollatorICU.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698