~ubuntu-branches/ubuntu/trusty/teeworlds/trusty-updates

« back to all changes in this revision

Viewing changes to src/base/tl/range.h

  • Committer: Package Import Robot
  • Author(s): Felix Geyer
  • Date: 2013-05-05 09:49:34 UTC
  • mfrom: (1.2.5)
  • Revision ID: package-import@ubuntu.com-20130505094934-uidw42ov1t0jlvrz
Tags: 0.6.2+dfsg-1
* New upstream release.
  - Update patches.
* Pass $CPPFLAGS to the build system.
* Switch to my @debian.org email address.
* Bump Standards-Version to 3.9.4, no changes needed.
* Change Vcs host to anonscm.debian.org.

Show diffs side-by-side

added added

removed removed

Lines of Context:
150
150
        }
151
151
 
152
152
        bool empty() const { return begin >= end; }
153
 
        void pop_front() { assert(!empty()); begin++; }
154
 
        void pop_back() { assert(!empty()); end--; }
155
 
        T& front() { assert(!empty()); return *begin; }
156
 
        T& back() { assert(!empty()); return *(end-1); }
157
 
        T& index(unsigned i) { assert(i >= 0 && i < (unsigned)(end-begin)); return begin[i]; }
 
153
        void pop_front() { tl_assert(!empty()); begin++; }
 
154
        void pop_back() { tl_assert(!empty()); end--; }
 
155
        T& front() { tl_assert(!empty()); return *begin; }
 
156
        T& back() { tl_assert(!empty()); return *(end-1); }
 
157
        T& index(unsigned i) { tl_assert(i < (unsigned)(end-begin)); return begin[i]; }
158
158
        unsigned size() const { return (unsigned)(end-begin); }
159
159
        plain_range slice(unsigned startindex, unsigned endindex)
160
160
        {