Small fixes needed to build on Linux: missing #includes and shadowed templates

This commit is contained in:
Getty 2015-03-14 17:28:02 -07:00
parent 5ffdef5959
commit 85c569b2f1
3 changed files with 6 additions and 4 deletions

View File

@ -10,6 +10,7 @@
#pragma once
#include "base/signal.h"
#include <string>
namespace app {

View File

@ -29,8 +29,8 @@ public:
std::size_t size() const { return m_items.size(); }
std::size_t limit() const { return m_limit; }
template<typename T, typename Predicate>
void addItem(const T& item, Predicate p) {
template<typename T2, typename Predicate>
void addItem(const T2& item, Predicate p) {
iterator it = std::find_if(m_items.begin(), m_items.end(), p);
// If the item already exist in the list...
@ -50,8 +50,8 @@ public:
m_items.insert(m_items.begin(), item);
}
template<typename T, typename Predicate>
void removeItem(const T& item, Predicate p) {
template<typename T2, typename Predicate>
void removeItem(const T2& item, Predicate p) {
iterator it = std::find_if(m_items.begin(), m_items.end(), p);
if (it != m_items.end())
m_items.erase(it);

View File

@ -12,6 +12,7 @@
#include "doc/object_id.h"
#include <vector>
#include <string>
namespace doc {