1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
12 Size() : _w(1), _h(1) {}
13 Size(int w, int h) : _w(w), _h(h) { assert(_w >= 0 && _h >= 0); }
14 Size(const Size &s) : _w(s._w), _h(s._h) { assert(_w >= 0 && _h >= 0); }
16 inline int width() const { return _w; }
17 inline int height() const { return _h; }
19 bool operator==(const Size &o) const { return _w == o._w && _h == o._h; }
20 bool operator!=(const Size &o) const { return _w != o._w || _h != o._h; }