2016-07-12 20 views

答えて

1

cocos2d :: Vectorはベクトルを受け取り、別のものにプッシュバックするpushBackをオーバーロードしています。彼らが過負荷にプッシュバック(constのベクトルその他&)

に使用プッシュバック(Tオブジェクト)を再していない理由は不明である何

V1.pushBack(V2); 

CCVector.h

/** Adds a new element at the end of the Vector. */ 
    void pushBack(T object) 
    { 
     CCASSERT(object != nullptr, "The object should not be nullptr"); 
     _data.push_back(object); 
     object->retain(); 
    } 

    /** Push all elements of an existing Vector to the end of current Vector. */ 
    void pushBack(const Vector<T>& other) 
    { 
     for(const auto &obj : other) { 
      _data.push_back(obj); 
      obj->retain(); 
     } 
    } 

P.S

関連する問題