~widelands-dev/widelands/trunk

« back to all changes in this revision

Viewing changes to src/logic/warelist.h

  • Committer: fios at foramnagaidhlig
  • Date: 2015-11-11 09:52:55 UTC
  • mto: This revision was merged to the branch mainline in revision 7621.
  • Revision ID: fios@foramnagaidhlig.net-20151111095255-i2zzpgjv5qw3yart
Renamed WareIndex to DescriptionIndex.

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
        using WareCountVector = std::vector<WareCount>;
45
45
 
46
46
        /// \return Highest possible ware id
47
 
        WareIndex get_nrwareids() const {return WareIndex(m_wares.size());}
 
47
        DescriptionIndex get_nrwareids() const {return DescriptionIndex(m_wares.size());}
48
48
 
49
 
        void add   (WareIndex, WareCount = 1);
 
49
        void add   (DescriptionIndex, WareCount = 1);
50
50
        void add(const WareList &);
51
 
        void remove(WareIndex, WareCount = 1);
 
51
        void remove(DescriptionIndex, WareCount = 1);
52
52
        void remove(const WareList & wl);
53
 
        WareCount stock(WareIndex) const;
 
53
        WareCount stock(DescriptionIndex) const;
54
54
 
55
 
        void set_nrwares(WareIndex const i) {
 
55
        void set_nrwares(DescriptionIndex const i) {
56
56
                assert(m_wares.empty());
57
57
                m_wares.resize(i, 0);
58
58
        }