Changeset 759 for trunk/lib/SVNlog.h


Ignore:
Timestamp:
Jan 29, 2009, 12:51:35 PM (12 years ago)
Author:
Peter Johansson
Message:

Change container in SVNlog to be std::set<Commitment>, in order to
avoid copying in SVNlog::operator+=. Previously we had vector, but the
index had no meaning, in other words, the random access was not used.

refs #74

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/SVNlog.h

    r693 r759  
    2828
    2929#include <string>
    30 #include <vector>
     30#include <set>
    3131
    3232#include <subversion-1/svn_client.h>
     
    4444  class SVNlog {
    4545  public:
     46    /**
     47       container used to store log
     48     */
     49    typedef std::set<Commitment, LessRevision> container;
     50
    4651    /**
    4752       Default constructor. Creates empty log.
     
    6570       \return Commitments
    6671    */
    67     inline const std::vector<Commitment>& commits(void) const
     72    inline const container& commits(void) const
    6873    { return lb_.commits; }
    6974
     
    7176       \return Commitments
    7277    */
    73     inline std::vector<Commitment>& commits(void)
     78    inline container& commits(void)
    7479    { return lb_.commits; }
    7580
     
    110115    */
    111116    struct log_receiver_baton {
    112       std::vector<Commitment> commits;
     117      container commits;
    113118    } lb_;
    114119
Note: See TracChangeset for help on using the changeset viewer.