Ignore:
Timestamp:
Jul 31, 2005, 10:02:13 PM (20 years ago)
Author:
darin
Message:

Reviewed by Maciej.

  • remove uses of Mac-OS-X-specific MAX macro
  • remove one of the many excess "APPLE_CHANGES" ifdefs
  • kjs/collector.cpp: (KJS::Collector::allocate): Use std::max instead of MAX.
  • kjs/property_map.cpp: (KJS::PropertyMap::rehash): Ditto.
  • kjs/ustring.cpp: (KJS::UChar::toLower): Take out non-ICU code path. (KJS::UChar::toUpper): Ditto. (KJS::UString::spliceSubstringsWithSeparators): Use std::max instead of MAX.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/collector.cpp

    r9768 r9992  
    2727#include "value.h"
    2828
     29#include <algorithm>
     30
    2931#if APPLE_CHANGES
    3032#include <CoreFoundation/CoreFoundation.h>
     
    3436#include <mach/thread_act.h>
    3537#endif
     38
     39using std::max;
    3640
    3741namespace KJS {
     
    102106    // oversize allocator
    103107    if (heap.usedOversizeCells == heap.numOversizeCells) {
    104       heap.numOversizeCells = MAX(MIN_ARRAY_SIZE, heap.numOversizeCells * GROWTH_FACTOR);
     108      heap.numOversizeCells = max(MIN_ARRAY_SIZE, heap.numOversizeCells * GROWTH_FACTOR);
    105109      heap.oversizeCells = (CollectorCell **)kjs_fast_realloc(heap.oversizeCells, heap.numOversizeCells * sizeof(CollectorCell *));
    106110    }
     
    132136   
    133137    if (heap.usedBlocks == heap.numBlocks) {
    134       heap.numBlocks = MAX(MIN_ARRAY_SIZE, heap.numBlocks * GROWTH_FACTOR);
     138      heap.numBlocks = max(MIN_ARRAY_SIZE, heap.numBlocks * GROWTH_FACTOR);
    135139      heap.blocks = (CollectorBlock **)kjs_fast_realloc(heap.blocks, heap.numBlocks * sizeof(CollectorBlock *));
    136140    }
Note: See TracChangeset for help on using the changeset viewer.