Ticket #2304: 0ad_osx10_9.patch

File 0ad_osx10_9.patch, 4.7 KB (added by julian37, 7 years ago)

Patch against r14482 for building on OS X 10.9 (Mavericks) without 10.8 SDK

  • source/renderer/ModelRenderer.cpp

     
    421421
    422422    Allocators::DynamicArena arena(256 * KiB);
    423423    typedef ProxyAllocator<void*, Allocators::DynamicArena > ArenaProxyAllocator;
    424     typedef std::vector<CModel*, ArenaProxyAllocator> ModelList_t;
     424    typedef std::vector<CModel*, ProxyAllocator< CModel*, Allocators::DynamicArena > > ModelList_t;
    425425    typedef boost::unordered_map<SMRMaterialBucketKey, ModelList_t, SMRMaterialBucketKeyHash,
    426         std::equal_to<SMRMaterialBucketKey>, ProxyAllocator<void*, Allocators::DynamicArena >
     426                                     std::equal_to<SMRMaterialBucketKey>, ProxyAllocator< std::pair<const SMRMaterialBucketKey, ModelList_t>, Allocators::DynamicArena >
    427427    > MaterialBuckets_t;
    428428    MaterialBuckets_t materialBuckets((MaterialBuckets_t::allocator_type(arena)));
    429429
     
    477477        }
    478478    }
    479479
    480     std::vector<SMRSortByDistItem, ArenaProxyAllocator> sortByDistItems((ArenaProxyAllocator(arena)));
     480    std::vector<SMRSortByDistItem, ProxyAllocator<SMRSortByDistItem, Allocators::DynamicArena> > sortByDistItems((ProxyAllocator<SMRSortByDistItem, Allocators::DynamicArena>(arena)));
    481481
    482     std::vector<CShaderTechniquePtr, ArenaProxyAllocator> sortByDistTechs((ArenaProxyAllocator(arena)));
     482    std::vector<CShaderTechniquePtr, ProxyAllocator<CShaderTechniquePtr, Allocators::DynamicArena> > sortByDistTechs((ProxyAllocator<CShaderTechniquePtr, Allocators::DynamicArena>(arena)));
    483483        // indexed by sortByDistItems[i].techIdx
    484484        // (which stores indexes instead of CShaderTechniquePtr directly
    485485        // to avoid the shared_ptr copy cost when sorting; maybe it'd be better
     
    486486        // if we just stored raw CShaderTechnique* and assumed the shader manager
    487487        // will keep it alive long enough)
    488488
    489     std::vector<SMRTechBucket, ArenaProxyAllocator> techBuckets((ArenaProxyAllocator(arena)));
     489    std::vector<SMRTechBucket, ProxyAllocator<SMRTechBucket, Allocators::DynamicArena> > techBuckets((ProxyAllocator<SMRTechBucket, Allocators::DynamicArena>(arena)));
    490490
    491491    {
    492492        PROFILE3("processing material buckets");
     
    546546    // (This exists primarily because techBuckets wants a CModel**;
    547547    // we could avoid the cost of copying into this list by adding
    548548    // a stride length into techBuckets and not requiring contiguous CModel*s)
    549     std::vector<CModel*, ArenaProxyAllocator> sortByDistModels((ArenaProxyAllocator(arena)));
     549    std::vector<CModel*, ProxyAllocator<CModel*, Allocators::DynamicArena> > sortByDistModels((ProxyAllocator<CModel*, Allocators::DynamicArena>(arena)));
    550550
    551551    if (!sortByDistItems.empty())
    552552    {
     
    595595        // This vector keeps track of texture changes during rendering. It is kept outside the
    596596        // loops to avoid excessive reallocations. The token allocation of 64 elements
    597597        // should be plenty, though it is reallocated below (at a cost) if necessary.
    598         std::vector<CTexture*, ArenaProxyAllocator> currentTexs((ArenaProxyAllocator(arena)));
     598        std::vector<CTexture*, ProxyAllocator<CTexture*, Allocators::DynamicArena> > currentTexs((ProxyAllocator<CTexture*, Allocators::DynamicArena>(arena)));
    599599        currentTexs.reserve(64);
    600600       
    601601        // texBindings holds the identifier bindings in the shader, which can no longer be defined
    602602        // statically in the ShaderRenderModifier class. texBindingNames uses interned strings to
    603603        // keep track of when bindings need to be reevaluated.
    604         std::vector<CShaderProgram::Binding, ArenaProxyAllocator> texBindings((ArenaProxyAllocator(arena)));
     604        std::vector<CShaderProgram::Binding, ProxyAllocator<CShaderProgram::Binding, Allocators::DynamicArena> > texBindings((ProxyAllocator<CShaderProgram::Binding, Allocators::DynamicArena>(arena)));
    605605        texBindings.reserve(64);
    606         std::vector<CStrIntern, ArenaProxyAllocator> texBindingNames((ArenaProxyAllocator(arena)));
     606        std::vector<CStrIntern, ProxyAllocator<CStrIntern, Allocators::DynamicArena> > texBindingNames((ProxyAllocator<CStrIntern, Allocators::DynamicArena>(arena)));
    607607        texBindingNames.reserve(64);
    608608
    609609        while (idxTechStart < techBuckets.size())
  • source/tools/atlas/AtlasObject/AtlasObjectImpl.h

     
    5959
    6060    std::wstring value;
    6161
    62     typedef std::multimap<const std::string, const AtNode::Ptr> child_maptype;
    63     typedef std::pair<const std::string, const AtNode::Ptr> child_pairtype;
     62    typedef std::multimap<std::string, AtNode::Ptr> child_maptype;
     63    typedef std::pair<std::string, AtNode::Ptr> child_pairtype;
    6464
    6565    child_maptype children;
    6666