Ignore:
Timestamp:
Mar 16, 2010, 2:07:38 PM (15 years ago)
Author:
Darin Adler
Message:

Rolled out r56081 since it broke the Windows build.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/wtf/StdLibExtras.h

    r56081 r56085  
    11/*
    2  * Copyright (C) 2008, 2010 Apple Inc. All Rights Reserved.
     2 * Copyright (C) 2008 Apple Inc. All Rights Reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    2727#define WTF_StdLibExtras_h
    2828
    29 #include <stdlib.h>
    3029#include <wtf/Assertions.h>
    3130
     
    5554namespace WTF {
    5655
    57     // C++'s idea of a reinterpret_cast lacks sufficient cojones.
     56    /*
     57     * C++'s idea of a reinterpret_cast lacks sufficient cojones.
     58     */
    5859    template<typename TO, typename FROM>
    59     inline TO bitwise_cast(FROM from)
     60    TO bitwise_cast(FROM from)
    6061    {
    6162        COMPILE_ASSERT(sizeof(TO) == sizeof(FROM), WTF_bitwise_cast_sizeof_casted_types_is_equal);
     
    7677    }
    7778
    78     // Returns the length of an array. Use instead of macros such as ARRAYSIZE.
    79     template<class ElementType, size_t length>
    80     inline size_t arrayLength(ElementType (&)[length])
    81     {
    82         return length;
    83     }
    84 
    8579} // namespace WTF
    8680
    87 using WTF::arrayLength;
    88 using WTF::bitCount;
    89 using WTF::bitwise_cast;
    90 
    9181#endif
Note: See TracChangeset for help on using the changeset viewer.