* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
+#include <algorithm>
#include <cassert>
#include <cmath>
-#include <algorithm>
#include <limits>
#include "signal.hpp"
using std::back_inserter;
using std::copy;
using std::dynamic_pointer_cast;
-using std::max;
-using std::min;
-using std::none_of;
-using std::numeric_limits;
+using std::none_of; // Used in assert()s.
using std::shared_ptr;
using std::stable_sort;
using std::vector;
const ViewItemPaintParams pp(rect(), view_.scale(), view_.offset());
const vector< shared_ptr<ViewItem> > items(this->items());
for (auto i = items.rbegin(); i != items.rend(); i++)
- if ((*i)->enabled() &&
- (*i)->hit_box_rect(pp).contains(pt))
+ if ((*i)->enabled() && (*i)->hit_box_rect(pp).contains(pt))
return *i;
return nullptr;
}
vector< shared_ptr<ViewItem> > Viewport::items()
{
vector< shared_ptr<ViewItem> > items;
- const std::vector< shared_ptr<ViewItem> > view_items(
+ const vector< shared_ptr<ViewItem> > view_items(
view_.list_by_type<ViewItem>());
copy(view_items.begin(), view_items.end(), back_inserter(items));
const vector< shared_ptr<TimeItem> > time_items(view_.time_items());